slice: Climatological slicing of timeseries

Description Usage Arguments Details Value

View source: R/slice.R

Description

slice, subslice, and unslice are used to separate a timeseries into climatological windows, then reconstruct the timeseries from the windowed data.

Usage

1
2
3
4
5
slice(x, how, outer=FALSE)

subslice(s, how, split=how$params$split)

unslice(s, how)

Arguments

x

A vector of values to be sliced into windows.

how

A cslice object defining the windows to use for slicing.

outer

Logical: if TRUE, uses the outer windows from how, which can overlap. If FALSE (the default), uses inner windows, which cover the data completely without overlapping.

s

Sliced data – a list of vectors, each corresponding to a different climatological window.

split

Whether to segment subsliced data by year. Defaults to the split parameter of how.

Details

slice uses a cslice object to separate a timeseries into climatological windows. unslice reconstructs the timeseries from the (possibly modified) sliced data. subslice takes data that has been sliced into outer windows and extracts the inner windows from each slice.

Whether the sliced data is further segmented by year depends on whether the cslice object is segmented (i.e., called with split=TRUE). The subslice function also accepts a split argument to override the default.

Value

a list of vectors, one for each climatological window.

a list of vectors, one for each climatological window.

a single timeseries vector.


sethmcg/climod documentation built on Nov. 19, 2021, 11:12 p.m.