Skip to content
Prev 205143 / 398506 Next

Help needed on applying a function across different data sets and aggregating the results into a single data set

On Jan 1, 2010, at 10:34 PM, Girish A.R. wrote:

            
Unfortunately, that is not a list, but rather a character vector
 > DF <- cbind("df1","df2","df100")
 > str(DF)
  chr [1, 1:3] "df1" "df2" "df100"

Instead define it as a list of objects (i.e., with no quotes):

LL <- list(df1, df2, .... , df100)
#and then
lapply(LL, function(x) lsfit(x$A,x$B) )