I am in the process of converting from Matlab to R, but a major sticking point for me at the moment is accessing data via OPeNDAP. After several hours of searching, I found that other people have discussed this functionality in the past, but it does not appear to have yet been developed. One programmer, Luke Miller, has managed a work-around by downloading ascii data from an OPeNDAP site ( http://lukemiller.org/index.php/2011/02/accessing-noaa-tide-data-with-r/), but direct access to the netcdf files would reduce data download requirements greatly. I'm sure this must be a common requirement, particularly among earth scientists - perhaps they are all still using Matlab. Does anyone have have a solution? Or maybe I am just not proficient enough at finding solutions on the R-network... Thanks in advance for your time, Phil. [[alternative HTML version deleted]]
The package ncdf4 (http://cran.r-project.org/web/packages/ncdf4/index.html) can access remote OpeNDAP data services. If you use Windows, the author has a binary package on his site. Also, if you want a GUI that works with R and allows you to visually select the space-time slice you want, try the Environmental Data Connector for R (http://www.pfeg.noaa.gov/products/EDC/EDCdownloads.html) -Roy On Dec 13, 2011, at 11:50 AM, Phil Wiles wrote:> I am in the process of converting from Matlab to R, but a major sticking > point for me at the moment is accessing data via OPeNDAP. > > After several hours of searching, I found that other people have discussed > this functionality in the past, but it does not appear to have yet been > developed. One programmer, Luke Miller, has managed a work-around by > downloading ascii data from an OPeNDAP site ( > http://lukemiller.org/index.php/2011/02/accessing-noaa-tide-data-with-r/), > but direct access to the netcdf files would reduce data download > requirements greatly. > > I'm sure this must be a common requirement, particularly among earth > scientists - perhaps they are all still using Matlab. Does anyone have > have a solution? Or maybe I am just not proficient enough at finding > solutions on the R-network... > > Thanks in advance for your time, > > Phil. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.
GDAL can do it, and so then can the rgdal package if you can compile against a GDAL including the OpenDAP driver. You get each 2+D-array (subdataset in GDAL terms) flattened into a series of 2D rasters where each slice in higher dimensions is an attribute on the raster, but that often is quite useable. (I see Roy Mendelssohn points out that ncdf4 can do it, which I did not know - that is good to hear.) Cheers, Mike. On Wed, Dec 14, 2011 at 6:50 AM, Phil Wiles <philip.wiles at gmail.com> wrote:> I am in the process of converting from Matlab to R, but a major sticking > point for me at the moment is accessing data via OPeNDAP. > > After several hours of searching, I found that other people have discussed > this functionality in the past, but it does not appear to have yet been > developed. ?One programmer, Luke Miller, has managed a work-around by > downloading ascii data from an OPeNDAP site ( > http://lukemiller.org/index.php/2011/02/accessing-noaa-tide-data-with-r/), > but direct access to the netcdf files would reduce data download > requirements greatly. > > I'm sure this must be a common requirement, particularly among earth > scientists - perhaps they are all still using Matlab. ?Does anyone have > have a solution? ?Or maybe I am just not proficient enough at finding > solutions on the R-network... > > Thanks in advance for your time, > > Phil. > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.-- Michael Sumner Institute for Marine and Antarctic Studies, University of Tasmania Hobart, Australia e-mail: mdsumner at gmail.com