Displaying 1 result from an estimated 1 matches for "ind_2".
Did you mean:
ind2
2010 Apr 23
1
creating dummy with loop command
...help me more at this time.
Thank you for your help in advance
--------------------------
Serdal,
I think what David is saying: just take those 2 variables you have and
specify them as factors. Assuming your data frame is called "MyData":
MyData$Ind_1<-as.factor(MyData$Ind_1)
MyData$Ind_2<-as.factor(MyData$Ind_2)
This way R will know they are not numeric variables but categorical
variables. Then, when you do analyses using those variables, R will
treat them as such and will build dummies "automatically" (e.g., if
you use regression, etc.).
Actually - it'd be nice...