extractmonths {RMAWGEN} | R Documentation |
Extracts the rows of a matrix corresponding to requested months of a year given the date (origin) of the first row
Description
Extracts the rows of a matrix corresponding to requested months of a year given the date (origin) of the first row
Usage
extractmonths(data = array(1:ndim_max, dim = c(ndim_max, 1)),
ndim_max = 1e+05, when = c("Dec", "Jan", "Feb"), year = NULL,
origin = "1961-1-1")
Arguments
data |
an input data matrix where each row corresponds to a daily record |
ndim_max |
maximum (integer) number of rows in |
when |
character vactor of months for which the data are required.
It must be a subset of |
year |
year(s) when data must be extracted |
origin |
date corresponding to the first row of |
Value
a matrix containing the requested rows
Note
Author(s)
Emanuele Cordano, Emanuele Eccel
See Also
Examples
extractmonths()
data(trentino)
dates <- sprintf("%02d-%02d-%02d",TEMPERATURE_MAX$year,TEMPERATURE_MAX$month,TEMPERATURE_MAX$day)
origin <- dates[1]
out <- extractmonths(data=TEMPERATURE_MAX,origin=origin)
[Package RMAWGEN version 1.3.7 Index]