Description Usage Arguments Examples
Returns a matrix of a given variable with time in rows and station index in columns. Useful to obtain observations that occur at the same time.
1 2 3 4 | pivotAtSite(x, ...)
## S3 method for class 'formula'
pivotAtSite(form, x)
|
x |
Data.frame containing at-site date. If |
form |
Formula that specify the variable of interest in
|
1 2 3 4 5 6 7 8 | site1 <- data.frame(site = 1, year = seq(2000,2010),
v =rnorm(11), w =rnorm(11))
site2 <- data.frame(site = 2, year = seq(1995,2007),
v =rnorm(13), w =rnorm(13))
site3 <- data.frame(site = 3, year = seq(1995,2010),
v =rnorm(16), w =rnorm(16))
xdf <- rbind(site1,site2, site3)
xdf; pivotAtSite(v~year+site,xdf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.