Learn R Programming

extRemes (version 2.0-9)

datagrabber.declustered: Get Original Data from an R Object

Description

Get the original data set used to obtain the resulting R object for which a method function exists.

Usage

# S3 method for declustered
datagrabber(x, ...)

# S3 method for extremalindex datagrabber(x, ...)

# S3 method for fevd datagrabber(x, response = TRUE, cov.data = TRUE, ...)

Arguments

x

An R object that has a method function for datagrabber.

response, cov.data

logical; should the response data be returned? Should the covariate data be returned?

optional arguments to get. This may eventually become deprecated as scoping gets mixed up, and is currently not actually used.

Value

The original pertinent data in whatever form it takes.

Details

Accesses the original data set from a fitted fevd object or from declustered data (objects of class “declustered”) or from extremalindex.

See Also

datagrabber, extremalindex, decluster, fevd, get

Examples

Run this code
# NOT RUN {
y <- rnorm(100, mean=40, sd=20)
y <- apply(cbind(y[1:99], y[2:100]), 1, max)
bl <- rep(1:3, each=33)

ydc <- decluster(y, quantile(y, probs=c(0.95)), r=1, blocks=bl)

yorig <- datagrabber(ydc)
all(y - yorig == 0)


# }

Run the code above in your browser using DataLab