search for: homecomput

Displaying 4 results from an estimated 4 matches for "homecomput".

Did you mean: homecomputer
2018 Apr 10
4
convert numeric variables to factor
...t; > > cols<- c(?GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL" > "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", "MASSMEDIA_M", > "HomeComputer", "HomeInternet") for (i in cols) {data.frame[,i]= > as.factor(data.frame[,i])} > > > Error: unexpected string constant in ?cols<- c(?GrMM", "RELG", "CASTE1", > "SECTOR", "SECTOR4","AGE", "MARITAL" &...
2018 Apr 10
0
convert numeric variables to factor
...ollowing error: cols<- c("GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL", "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "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, Eric Berger <ericjberger at gmail.com> wro...
2018 Apr 10
0
convert numeric variables to factor
...g error message. > cols<- c(?GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL" "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", "MASSMEDIA_M", "HomeComputer", "HomeInternet") for (i in cols) {data.frame[,i]= as.factor(data.frame[,i])} Error: unexpected string constant in ?cols<- c(?GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL" "JOBSTATUS"&qu...
2018 Apr 09
2
convert numeric variables to factor
Hello, Though Bert's and David's answers are what you should do, note that some R functions that need factors will coerce their input variables when necessary. Have you tried to run the code you haven't posted without coercing to factor? It might run... Hope this helps, Rui Barradas On 4/9/2018 6:11 PM, David L Carlson wrote: > Try the help files: > > ?factor >