| To: | "Zhan, Ping N." <Ping.Zhan@celera.com>, s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Re: "data =" option |
| From: | "Richard M. Heiberger" <rmh@temple.edu> |
| Date: | Thu, 16 Sep 2004 22:36:29 -0400 |
The data= argument to the modeling functions requires a data.frame.
You gave it a matrix. Run this and see the difference.
xy <- matrix(1:6, nrow=3, dimnames=list(c("a","b","c"), c("A","B")))
xyd <- as.data.frame(xy)
lm(A ~ B, data=xy)
lm(A ~ B, data=xyd)
is.data.frame(xy)
is.data.frame(xyd)
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Graphical representation of variable, Richard M. Heiberger |
|---|---|
| Next by Date: | Splus NuOpt for S-PLUS Version 1.4.6.3, Steve Su |
| Previous by Thread: | "data =" option, Zhan, Ping N. |
| Next by Thread: | Re: Graphical representation of variable, Richard M. Heiberger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |