Learn R Programming

WACS (version 1.1.0)

WACSdata: Format data for WACS

Description

WACSdata Builds a data structure compatible with WACS functions

Usage

WACSdata(
  data,
  mapping = NULL,
  bounds = NULL,
  from = NULL,
  to = NULL,
  skip = NULL,
  Trange = FALSE,
  seasons = c("03-01", "06-01", "09-01", "12-01")
)

Arguments

data

A dataframe containing series of values for each variable

mapping

The names of special variables: year, month, day, rain, tmin and tmax. Eg. list(RR = "rain", Tmin = "tmin") [optional; default is NULL]

bounds

A list of lists indicating the bounds for some variables eg. list(rain=list(min=0, max=7)) [optional; default is NULL] If not provided is set automatically according to data

from

Date at which the estimation should begin [optional; default is NULL]

to

Date at which the estimation should stop [optional; default is NULL]

skip

Vector of column names to skip[optional; default is NULL]

Trange

Boolean value. When Trange=TRUE, the couple (tmin, trange=tmax-tmin) is modeled. When Trange=FALSE, he couple (tmin, tmax) is modeled. Default is Trange=FALSE

seasons

Vector of string of format 'mm-dd', gives the dates of change of seasons (default: is c("03-01", "06-01", "09-01","12-01"))

Value

A data frame structure, which will be used to call WACSestim, the function that estimates the parameters of the statistical model.

Examples

Run this code
# NOT RUN {
  ## Simple example
  ThisData = WACSdata(ClimateSeries,from="1995-01-01",to="2012-12-31",
                      Trange=F,seasons=c("03-01","06-01","09-01","12-01"))
 
# }
# NOT RUN {
 
# }

Run the code above in your browser using DataLab