climdexInput.csv(tmax.file = NULL, tmin.file = NULL,
prec.file = NULL,
data.columns = list(tmin = "tmin", tmax = "tmax", prec = "prec"),
base.range = c(1961, 1990), na.strings = NULL,
cal = "gregorian", date.types = NULL, n = 5,
northern.hemisphere = TRUE,
pad.data.with.first.last.values = FALSE,
tavg.file = NULL, quantiles = NULL,
temp.qtiles = c(0.1, 0.9), prec.qtiles = c(0.95, 0.99),
max.missing.days = c(annual = 15, monthly = 3),
min.base.data.fraction.present = 0.1)read.csv.climdexInput-class for
use with other climdex methods.Any of tmin.file (daily minimum temperature), tmax.file (daily maximum temperature), tavg.file (daily mean temperature), and prec.file (daily precipitation) can be passed in. tavg will be derived from the mean of tmax and tmin if it is not supplied. If any of tmin.file, tmax.file, and prec.file are not supplied, the set of indices which can be calculated will be limited to indices which do not involve the missing variables.
The tmax.file, tmin.file, and
prec.file arguments should be names of CSV files
containing dates and the data on which the indices are to
be computed. The units are assumed to be degrees C for
temperature, and mm/day for precipitation.
The data.columns argument is a vector consisting
of named items tmax, tmin, and prec. These named items
are used as the column names in their respective files
when loading in CSV.
The cal argument is a textual description of the
calendar type, as described in the documentation for
as.PCICt.
The date.types argument is a list of lists
containing two named items: fields, and
format. The fields item is a vector of
names consisting of the columns to be concatenated
together with spaces. The format item is a date
format as taken by strptime.
For more details on arguments, see
link{climdexInput.raw}.
climdex.pcic-package,
climdexInput.raw.## This would create a climdexInput object from a set of filenames (already
## stored as variables), with a different date format.
ci.csv <- climdexInput.csv(tmax.filename, tmin.filename,
prec.filename, date.types=list(list(fields=c("date"), format="%Y-%m-%d")))Run the code above in your browser using DataLab