Hi, I would like to loop a specific code through multiple files ending in .CDF in the same directory, but I am unsure of how to do that (new to R).
Can someone please help me with this-thank you. This is the code I would like to loop: > xr<-xcmsRaw("mh141210xg2_sccs_00101.CDF", profstep=0) > write.mzdata(xr, file="mh141210xg2_sccs_00101.CDF") And there are 675 of these .CDF files in the directory that I would like to apply the code to. Also, when I save the file in the second line of code, I would like it to have the same name as it previously had, so just re-write the old file. Thanks so much for your time!! Majda [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.