SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to get K dummy variables, instead of K-1, try:
dummies = table(1:length(year),as.factor(year))
Best,