Description Usage Arguments Details Value Author(s) See Also Examples
this function extracts daily values of climatic variables from ICARDA Data, it returns a list or data frame based on specified climatic variables. Each variable will have 365 values for each day of the calendar year.
1 |
sites |
character. Names of sites from which to extract data. |
var |
character. Climatic variable(s) to be extracted. |
cv |
boolean. If |
ICARDA data has to be accessible either from a local directory on the computer or from an online repository. getDaily
will extract the climatic variables specified in var
for the sites specified in sites
.
For daily data, the function extracts average daily values starting from the first day of the calendar year, i.e. January 1, until the last day of the calendar year, i.e. December 31. Thus, 365 columns with daily values are created for each variable.
An object with specified climatic variables for names in sites
.
If cv = TRUE
, the object is a list containing two data frames: the first one with average daily values of climatic variables, and the second one with daily coefficient of variation for each climatic variable.
If cv = FALSE
, the object is a data frame with average daily values of climatic variables.
Zakaria Kehel, Bancy Ngatia
1 2 3 4 5 6 7 8 9 10 | if(interactive()){
# Extract daily data for durum wheat
durum <- getAccessions(crop = 'Durum wheat', coor = TRUE)
daily <- getDaily(sites = levels(as.factor(durum$SiteCode)),
var = c('tavg', 'prec', 'rh'), cv = TRUE)
# Get data frame with coefficient of variation from list object
# returned (when cv = TRUE)
daily.cv <- daily[[2]]
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.