search for: pre1r

Displaying 1 result from an estimated 1 matches for "pre1r".

Did you mean: pre1
2003 Dec 06
1
recode{car} does not work as expected?
Hi to all, I am having a problem when using recode from the car package. I have a variable that is char and when I use recode to create a new variable that is supposed to be numeric I get a factor variable. Here is the code I am using: > FCI$PRE1 <- recode (PRE1RES, " c('C', 'c')=1 ; else = 0 ; as.factor.result=FALSE ") So, if I understand correctly the recode command, the line above should create FCI$PRE1 variable with 1 if PRE1RES is c and zero otherwise. However, if I type > FCI$PRE1[0] I get as result: factor(0) Levels:...