View source: R/new_functions.R
extract_data | R Documentation |
Pulls climate or weather variables from a RasterBrick for different time periods and summarizes them by simple metrics
extract_data( brick, measures = c("mean"), timeframe = c("annual", "winter", "spring", "summer", "fall"), writefile = T, varname = NULL, layer_type = "month", hemisphere = "northern", directory = "./" )
brick |
an object of class RasterBrick |
measures |
a character vector indicating how variables should be summarized (allows mean, min, max, and sum) |
timeframe |
a character vector indicating the time over which variables should be summarized (allows annual, winter, spring, summer, fall, or wateryear) |
writefile |
logical; if TRUE, saves a .csv file to the users' machine |
varname |
a character vector indicating which climate or weather variable you are extracting (e.g. tmin, tmax) |
layer_type |
a character vector indicating if each layer represents a month or a year |
hemisphere |
a character vector indicating if temperate northern or southen hemisphere seasons should be used |
directory |
a path to where files should be written if writefile=TRUE |
if writefile=TRUE, .csv files of matrices; if writefile=FALSE, a list of lists of matrices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.