Additional arguments:
intervals
: an integer (no lower than 5), for the days intervals when
timeseries = TRUE
last.day
: optional to span, an object of class Date
or
any other object that can be coerced to Date
(e.g. integer, character
YYYY-MM-DD) for the last day of the time series. For data.frame
, array
and sf
methods
dates
: a character (or Date or numeric) vector for the dates of tmax and tmin
in the default
method
data.from
: character for the source of remote data. Current remote source
is: 'nasapower'
pars
: character vector for the temperature data to be fetched. If
data.from
is 'nasapower', the temperature can be adjusted to 2 m, the default,
c("T2M_MAX", "T2M_MIN") or 10 m c("T10M_MAX", "T10M_MIN")
days.before
: optional, an integer for the number of days before
day.one to be included in the timespan.
# S3 Methods
The array
method assumes that object contains climate data available
in your R section; this requires an array with two dimensions, 1st dimension
contains the day temperature and 2nd dimension the night temperature,
see help("temp_dat", package = "climatrends") for an example on input structure.
The data.frame
and the sf
methods assumes that the climate data
will be fetched from a remote (cloud) source that be adjusted using the argument
data.from.
When timeseries = TRUE, an id is created,
which is the index for the rownames of the inputted object.