| To: | "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | Sum: Function to summarize lm objects |
| From: | "Yang, Richard" <dyang@NRCan.gc.ca> |
| Date: | Thu, 29 Mar 2001 12:32:39 -0500 |
Hi Spluser;
Many thanks to Sam Buttrey, James Holtman, and Brad Biggerstaff for their
quick responses. As Sam Buttrey points out, the key here is get() function,
which takes a name and returns the object with that name. The function
Result <- function(n) {
lmfile <- paste("lmrun",1:n, sep="")
sink("Sum.lm", append = T)
for (i in 1:n) {
print(summary(get(lmfile[i])))
}
sink()
}
summarizes all objects named lmrun1 to n in the file Sum.lm.
Thanks,
Richard
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: passing parms in S+ batch (UNIX), Don MacQueen |
|---|---|
| Next by Date: | Does anyone have code for Durbin-Watson or the Durbin h-test, Neelakantan, Kumar |
| Previous by Thread: | passing parms in S+ batch (UNIX), Vukov, Suzanne (Suzan) |
| Next by Thread: | Does anyone have code for Durbin-Watson or the Durbin h-test, Neelakantan, Kumar |
| Indexes: | [Date] [Thread] [Top] [All Lists] |