search for: massmedia_m

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

Did you mean: massmedia_f
2018 Apr 10
4
convert numeric variables to factor
...he following 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...
2018 Apr 10
0
convert numeric variables to factor
...After that I have the following 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 <ericjber...
2018 Apr 10
0
convert numeric variables to factor
...wever, I get the following 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"...
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 >