Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
kvalobs:kvoss:system:qc2:8hdk376snf09zj37dk82s92:ncdf [2009-06-20 16:21:09] paule |
kvalobs:kvoss:system:qc2:8hdk376snf09zj37dk82s92:ncdf [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Installing ncdf in R ====== | ====== Installing ncdf in R ====== | ||
- | **NB** a prerequisite is that the netcdf libraries are alreadz | + | **NB** a prerequisite is that the netcdf libraries are already |
< | < | ||
Line 15: | Line 15: | ||
$ R CMD INSTALL ncdf | $ R CMD INSTALL ncdf | ||
$ history | $ history | ||
+ | ... | ||
+ | ... | ||
+ | # there are perhaps even easier ways to do this: | ||
+ | |||
+ | $ install.packages(" | ||
+ | |||
+ | # no source was linked ... but the mirror choose automatically opens | ||
+ | # and one just selects a site and the install happens! | ||
+ | ... | ||
+ | $ | ||
</ | </ | ||
+ | |||
+ | Making use of ncdf in R | ||
+ | |||
+ | < | ||
+ | $ R | ||
+ | | ||
+ | | ||
+ | | ||
+ | nd = open.ncdf(" | ||
+ | | ||
+ | | ||
+ | | ||
+ | v <- array(x, length(x)) | ||
+ | w <- array(y, length(y)) | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ff <- lm(xxx ~ yyy) | ||
+ | | ||
+ | | ||
+ | | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | Alternatively, | ||
+ | < | ||
+ | $ Rscript plot_netcdf.R "Test Plot" OUTPUT | ||
+ | </ | ||
+ | that will produce the file OUTPUT.jpg with the plot title "Test Plot". | ||
+ | * {{kvalobs: | ||
+ | |||
+ |