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")

Both failed.

#** And while i've got your attention- is there a 'letter equivalent' to seq() which would have worked nicely for prfxs? ie., letter.seq(A:F)

Thoughts and suggestions sincerely appreciated,

Karl



--
Karl Brand
Department of Genetics
Erasmus MC
Dr Molewaterplein 50
3015 GE Rotterdam
T +31 (0)10 704 3457 |F +31 (0)10 704 4743 |M +31 (0)642 777 268

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to