Displaying 1 result from an estimated 1 matches for "prfxs".
2010 Sep 11
1
'programatically' list or call objects for use in a function?
Esteemed R users and developers,
How does one 'programatically' list or call objects for use in a function?
For example, i thought i could do something better than this:
save(A.cwb, B.cwb, C.cwb, D.cwb, E.cwb, F.cwb, file="afile.RData")
with something like these-
prfxs <- c("A", "B", "C", "D", "E", "F") #**
save(as.name(paste(prfxs, "cwb", sep=".")), file="afile.RData")
or this-
do.call(save, paste(prfxs, "cwb", sep="."), file="afile.RData"...