Hi folks,
I have a data frame containing a column of type 'factor'. This column
contains three distinct values, namely, 'Current', 'lastyr', and '2yrsago'.
I would like to use the recode function from the menu functions in S-PLUS
2000 to convert these values numeric ones as 3, 2, and 1, respectively.
This should be fairly straightforward, but when you attempt to recode the
values for '2yrsago', the following error is produced:
Error in parse(text = txt): Syntax error: name ("yrsago") used illegally at
this point:
df <- menuRecode(data = df, variable = list("fiscalyr"), current.value =
2yrsago
Does anyone know why I would see this error? This error does not appear
when I use the menuRecode function on the values 'Current' and 'lastyr'.
Thanks in advance,
Reid Gilliam
GRCI, Inc.
|