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 22:40:08] paule |
kvalobs:kvoss:system:qc2:8hdk376snf09zj37dk82s92:ncdf [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
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! | ||
+ | ... | ||
+ | $ | ||
</ | </ | ||
Line 21: | Line 31: | ||
< | < | ||
$ R | $ R | ||
- | | + | |
- | > | + | |
- | > | + | library(ncdf) |
- | > | + | |
- | > | + | |
- | > | + | |
- | > | + | x[x==-1]=0 |
- | > | + | v <- array(x, length(x)) |
- | > | + | |
- | > plot(xxx, | + | |
- | > | + | |
+ | | ||
+ | xxx=xx[!is.na(yy) & yy>=0 & yy < 100] | ||
+ | | ||
+ | plot(xxx, | ||
+ | XC=cor(xxx,yyy) | ||
+ | ff <- lm(xxx ~ yyy) | ||
+ | | ||
+ | | ||
+ | | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | > ff <- lm(yyy ~ xxx) | ||
- | > z=ff$coefficients[1]*xxx + ff$coefficients[2] | ||
</ | </ | ||
+ | |||
+ | Alternatively, | ||
+ | < | ||
+ | $ Rscript plot_netcdf.R "Test Plot" OUTPUT | ||
+ | </ | ||
+ | that will produce the file OUTPUT.jpg with the plot title "Test Plot". | ||
+ | * {{kvalobs: | ||
+ | |||
+ |