| To: | sbmailinglist@gmail.com |
|---|---|
| Subject: | Re: Code that works outside a custom function but not inside |
| From: | Terry Therneau <therneau@mayo.edu> |
| Date: | Fri, 31 Oct 2008 08:07:27 -0500 (CDT) |
| Cc: | s-news@lists.biostat.wustl.edu |
| Reply-to: | Terry Therneau <therneau@mayo.edu> |
Your problem is the mixed-mode model statement
histogram (~mydata[,1]|mydata[,2],
data = mydata,
....
You want to either
leave out the "data=mydata" phrase
or use
histogram(~ X|SD,
data=mydata,
Your first statement says "look in the 'mydata' frame for variable names",
but the mydata data frame does not have 'mydata[,1]' as one of its variable
names. You can get away with this at the top level, where Splus can usually
find things even when given bad directions; but not inside a function.
Terry T.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Deadline extension: ICNS 2009 + 1st Workshop LMPCNAP | April 21-25, 2009 - Valencia, Spain, Jaime Lloret Mauri |
|---|---|
| Next by Date: | Deadline extension: ICAS 2009 | April 21-25, 2009 - Valencia, Spain, ICAS 2009 Chair |
| Previous by Thread: | Re: Code that works outside a custom function but not inside, gerald . jean |
| Next by Thread: | Deadline extension: ICNS 2009 + 1st Workshop LMPCNAP | April 21-25, 2009 - Valencia, Spain, Jaime Lloret Mauri |
| Indexes: | [Date] [Thread] [Top] [All Lists] |