s-news
[Top] [All Lists]

function to summarize lm objects

To: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Subject: function to summarize lm objects
From: "Yang, Richard" <dyang@NRCan.gc.ca>
Date: Thu, 29 Mar 2001 10:10:18 -0500
I have a series of lm objects (named lmrun1 to lmrun30) and wish to
summarize  model statistics from each object. Using summary() in the command
window is tedious.  The tried following function but it did not work as the
argument in the summary() was not recognized as an lm object. 

  Result <- function(n) {
         lmfile <- paste("lmrun",1:n, sep="")
         for (i in 1:n) {
             Sum.lm <- summary(lmfile[i])
         }
        
}

How to coercion the argument into an appropriate object?  Suggestions and
assistance are appreciated.

Thank you,

Richard

  



<Prev in Thread] Current Thread [Next in Thread>
  • function to summarize lm objects, Yang, Richard <=