Skip to content
Prev 205149 / 398506 Next

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

Thanks for the replies, Jim, David, and Dennis (who replied to me directly)! 

To summarize, here's what worked for me:
===========
dflist <- list(df1, df2, df3)
lsfun <- function(df) with(df, lsfit(A, B)$coef)
res <- lapply(dflist, lsfun)
do.call(rbind, res)
===========

cheers,
-Girish
Girish A.R. wrote: