[BioC] how to load RData in a loop with different file name?

Joern Toedling toedling at ebi.ac.uk
Mon Jun 25 19:52:43 CEST 2007


Hello,

the argument "file" to the function load can be a usual character string
in R, so you could construct it using "paste", for example:
for (i in 1:10){
load(paste("A",i,".RData",sep=""))}

Regards,
Joern

James Anderson wrote:
> Hi,
>
> I have 10 .RData files with names A1.RData, A2.RData, ...,A10.RData. Is there an automatic way to load those data in a loop so that for each iteration k, it reads in Ak.RData? I know how to do this for "save" command so that each iteration, but don't know how to do it using "load" command.
>
> Thanks a lot!
>
> James
>
>



More information about the Bioconductor mailing list