On Fri, 10 Aug 2007, Roberto Olivares Hernandez wrote:
> Hi,
>
> I am using xcms library to read mass spectrum data. I generate objects
> from CDF files using the command line
>
>> SME10 <- xcmsRaw("SME_10.CDF")
>
> I have 50 CDF files with different name and I don't want to repeat the
> command for each one. Is there any option to read all the files and
> generate a corresponding object name?
Something like
for(f in Sys.glob("*.CDF")) assign(sub("\\.CDF$", "", f), xcmsRaw(f))
(untested, of course).
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
[email protected] 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.