Re: [R] creating dummy with loop command

2010-04-23 Thread Dimitri Liakhovitski
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 vari

Re: [R] creating dummy with loop command

2010-04-23 Thread David Winsemius
On Apr 23, 2010, at 11:26 AM, serdal ozusaglam wrote: Dear R users, I have a simple question (probably) but i couldnt how to find a solution for that. i am using 2 digit industry codes and 3 digit industry codes for my model, and i need to create dummies for the industries. The case is

[R] creating dummy with loop command

2010-04-23 Thread serdal ozusaglam
Dear R users, I have a simple question (probably) but i couldnt how to find a solution for that. i am using 2 digit industry codes and 3 digit industry codes for my model, and i need to create dummies for the industries. The case is simple for the 2-digit industries since there are not that m