[R] factor failure
Erik Iverson
eriki at ccbr.umn.edu
Fri Aug 13 03:10:12 CEST 2010
On 08/12/2010 08:00 PM, elaine kuo wrote:
> Dear list,
>
>
> factor function was tried but failed.
> Pls kindly help and thank you.
>
> E.
>
>
> code
>
> rm(list=ls())
> library(faraway)
> data (pima)
>
> pima$test< - factor (pima$test)
> [1] NA NA NA NA NA NA
The unreported warning message should have given you a
hint.
I'm guessing you want the assignment operator, which is:
<- (no spaces)
pima$test <- factor(pima$test)
More information about the R-help
mailing list