2.3.2.conditioning.pems.data {pems.utils} | R Documentation |
Various functions for the conditioning of pems
objects.
cutBy(ref = NULL, ..., data = NULL, cut.method = NULL, labels = NULL, fun.name = "cutBy") cutByRow(ref = NULL, n = 4, rows = NULL, ..., data = NULL, fun.name = "cutByRow")
ref |
(Data series typically vector) The reference data series to consider when making a vector of subset markers/indices. See Details. |
... |
(Optional) Other arguments, currently passed on to |
data |
(Optional |
cut.method |
(Optional function) For |
labels |
(Character vector) For |
fun.name |
(function managment argument) |
n, rows |
(numerics) |
cutBy
and cutBy...
functions generate a vector of subset markers or indices based
of the type of cut applied and the range/size of the reference, ref
. See Value regarding
outputs.
cutBy
is a wrapper for other cutBy...
functions. It provides additional options for
cut.marker
naming.
cutByRow
assigns cut regions based in row number.
By default results are returned as pems.element
s.
The cut.marker
vector generated by cutBY
and cutBy...
functions
can then be used to condition and subsample data in pems
objects.
Currently, no warnings.
Various other cutBy...
options can be very simply encoded.
Karl Ropkins
References in preparation.
cut
, etc. in the main R package.
########### ##example 1 ########### #basic usage #working with a temporary pems temp <- pems.1 #cut into equal subsets temp$ref <- cutBy(velocity, n= 5, data=temp) pemsPlot(local.time, velocity, cond=ref, data=temp, type="l", layout=c(1,5)) #cut at three points temp <- pems.1 temp$ref <- cutBy(velocity, rows=c(180,410,700), data=temp) pemsPlot(local.time, velocity, cond=ref, data=temp, type="l", layout=c(1,5))