s-news
[Top] [All Lists]

problem with RECODE function in S-PLUS 2000

To: S Listserver <s-news@wubios.wustl.edu>
Subject: problem with RECODE function in S-PLUS 2000
From: "Gilliam, Reid" <rgilliam@grci.com>
Date: Thu, 15 Nov 2001 15:25:32 -0500
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.

<Prev in Thread] Current Thread [Next in Thread>
  • problem with RECODE function in S-PLUS 2000, Gilliam, Reid <=