Hi, you may use list.files('dir-of-your-files', ...) to get the paths
of all the files, and use file.info() to get the date attribute, then
order them by date, and finally in a loop

for(i in paths-of-your-files){
open.ncdf(i, ...)
...
}

Regards,
Yihui
--
Yihui Xie <[EMAIL PROTECTED]>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China



On Thu, Sep 18, 2008 at 5:13 AM, Brian Pettegrew
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am fairly new to R programming.  I have a series of netcdf files that I am
> able to open one at a time using open.ncdf.  I want to write this into an R
> script so that I can successively open each file by date in a for-loop.  Any
> suggestions?
>
> Thanks
>
> Brian Pettegrew
>
> --
> Brian Pettegrew
> Research Associate
> Cooperative Institute for Environmental Sciences
> NOAA/ESRL/Global Systems Division
> Boulder, CO  Phone: (303) 497-4129
> E-mail: [EMAIL PROTECTED]
>
>

______________________________________________
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