getOnset {icardaFIGSr} | R Documentation |
Extracting Daily Climatic Variables Based on Onset of Planting
Description
this function Extracts Daily values of climatic variables from remote ICARDA data based on Onset of Planting, it returns a list based on specified climatic variables. Each variable will have 365 values for each day of the (onset) year beginning with planting day.
Usage
getOnset(sites, crop, var, cv = FALSE)
Arguments
sites |
character. Names of sites from which to extract data. |
crop |
character. Crop code in ICARDA database. See section 'Details' for a list of crops. |
var |
character. Climatic variable(s) to be extracted. |
cv |
boolean. If |
Details
Similar to getDaily
except the extracted data is based on 365 days starting from the onset of planting.
Crops available in ICARDA's genebank documentation system include the following:
'ICAG' = Aegilops
'ICB' = Barley
'ICBW' = Bread wheat
'ILC' = Chickpea
'ICDW' = Durum wheat
'ILB' = Faba bean
'BPL' = Faba bean BPL
'IFMI' = Forage and range
'IFLA' = Lathyrus
'ILL' = Lentil
'IFMA' = Medicago annual
'IC' = Not mandate cereals
'IFPI' = Pisum
'ICPW' = Primitive wheat
'IFTR' = Trifolium
'IFVI' = Vicia
'ICWH' = Wheat hybrids
'ICWW' = Wheat wild relatives
'ILWC' = Wild Cicer
'ICWB' = Wild Hordeum
'ILWL' = Wild Lens
'ICWT' = Wild Triticum
Alternatively, the list of available crops can be fetched from ICARDA's online server using getCrops
.
Value
An object of class "data.frame" with specified climatic variables for names in sites
.
If cv = TRUE
, the object is a list containing three data frames: the first one with average daily values of climatic variables, the second one with daily coefficient of variation for each climatic variable, and the third one with phenotypic variables and number of day in calendar year when each occurs at the sites specified in sites
.
If cv = FALSE
, the object is a list containing two data frames: the first one with average daily values of climatic variables, and the second one with phenotypic variables and number of day in calendar year when each occurs at the sites specified in sites
.
Author(s)
Khadija Aouzal, Amal Ibnelhobyb, Zakaria Kehel, Bancy Ngatia
See Also
Examples
if(interactive()){
# Extract onset data for durum wheat
durum <- getAccessions(crop = 'Durum wheat', coor = TRUE)
onset <- getOnset(sites = levels(as.factor(durum$SiteCode)), crop = 'ICDW',
var = c('tavg', 'prec', 'rh'), cv = TRUE)
# Get data frame with climatic variables from list object returned
onset.clim <- onset[[1]]
# Get data frame with coefficient of variation from list object
# returned (when cv = TRUE)
onset.cv <- onset[[2]]
# Get data frame with phenotypic variables from list object returned
onset.pheno <- onset[[3]]
}