Re: [R] convert numeric variables to factor

2018-04-10 Thread Saif Tauheed
MASSMEDIA_F", "MASSMEDIA_M", "HomeComputer", "HomeInternet") > for (I in cols) {data.frame[,i]= as.factor(data.frame[,i])} Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called ‘sort’ on a list? > On 10-Apr-2018, at 3:12 PM,

Re: [R] convert numeric variables to factor

2018-04-10 Thread Saif Tauheed
> On 4/9/2018 6:11 PM, David L Carlson wrote: >> Try the help files: >> ?factor >> >> David L Carlson >> Department of Anthropology >> Texas A University >> College Station, TX 77843-4352 >> -Original M

Re: [R] convert numeric variables to factor

2018-04-09 Thread Saif Tauheed
Dear Sir, I have xlsx data set which I have imported to R studio. Now some of the variables are defined as numeric but I want define them as factor variable so that I run classification algorithm in R. Please to covert the variables. Thanks and Regards Abu Afzal PhD Eco JNU India