Skip to content

Instantly share code, notes, and snippets.

View dreidpath's full-sized avatar

Daniel D Reidpath dreidpath

View GitHub Profile
@dreidpath
dreidpath / replicated_analysis.R
Last active October 10, 2015 08:11
Code to loop through a series of dataframe applying an identical analysis to each and storing the regression [lm()] model results in a list
################################################################
# A student has five imputed datasets. She wanted to know the #
# easiest way to repeat the analysis with each dataset and #
# store the results. This may not be the "easiest" way, but #
# it is a way #
################################################################
#
################################################################
# Create five toy datasets to demonstrate the approach #
################################################################