DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Iteratively Create Objects
// Iteratively create objects from a list of names.
// Especially useful for creating consistent model objects for a list of data sources.
// Wrapping the assign statement in a try block is often advisable.
for(item in itemList){
assign(paste(item, "object", sep="."), function(get(paste(item, "data", sep=".")), options)
}





