Displaying 1 result from an estimated 1 matches for "risk1".
Did you mean:
risk
2003 May 19
2
upData levels in Hmisc
Dear listserve members, especially Prof. Harrell:
I am trying to create a factor variable that has fewer levels than the
original.
I have a factor:
>rosa$risk1
[1] 2 2 5 1 ...
[1799] 3 3 1 3 1 6 3 3 1 5 3 5 3 3 3 0 3 3 3 1 1 3
Levels: 0 1 2 3 4 5 6 8
But when I do this:
rosa2 <- upData(rosa,
levels=list(risk1=list(1='1',2='2',3='3',0=c('0','4','6','8'))))
I get:
Error: syntax error
But I am...