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
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/20
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
3 matches
Mail list logo