0
Hello,
I’m trying to convert a variable of the type double
in factor
ppar$abor <- as.factor(ppar$abor)
But I’m getting the following error:
Error in `$<-.data.frame`(`*tmp*`, abor, value = integer(0)) :
0
Hello,
I’m trying to convert a variable of the type double
in factor
ppar$abor <- as.factor(ppar$abor)
But I’m getting the following error:
Error in `$<-.data.frame`(`*tmp*`, abor, value = integer(0)) :
Browser other questions tagged r variables type-conversion
You are not signed in. Login or sign up in order to post.
Unable to know what is causing the error without a sample of your data. Spin
dput(ppar)
(or dput(head(ppar)) if the date.frame has many lines) and paste the output into the ask. Or simply provide a sample of the Abor column values.– Carlos Eduardo Lagosta
The variables of the type
double
are continuous variables. Are you sure you want to convert to categorical? (What is the difference between categories1.0
,1.001
and1.000000001
?)– Rui Barradas
Another thing, the error message is incomplete, it says only that there is an error in the function
$<-.data.frame
but it lacks the error itself. What did it say right away?– Rui Barradas