Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples
Various functions for the conditioning of pems
objects.
1 2 3 4 5 |
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, hijack |
(Various managment arguments) |
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
. As elsewhere in
pems.utils
, by default inputs are returned in the state them are supplied. See Value.
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 in the supplied format. So: If inputs are supplied
as vectors, the answer is returned as a vector; If inputs are supplied in a
pems
object, that pems
object is returned with the answer added in.
This behaviour is enabled by the default output = "special"
.
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.
hijack
is an in-development argument, supplied to allow code developers to run multiple
functions in different function environments. When developers 'mix and match' code from
several sources it can become unstable, especially if functions are run within functions within
functions, etc. hijack = TRUE
and associated code makes a function local to 'side-step'
this issue. This work by assuming/expecting all inputs to be local, i.e. supplied directly by
the code user.
Various other cutBy...
options can be very simply encoded.
Karl Ropkins
References in preparation.
cut
, etc. in the main R package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ###########
##example 1
###########
#basic usage
#cut into equal subsets
a <- cutBy(velocity, n= 5, data=pems.1)
latticePlot(velocity~local.time|cut, data=a,
type="l", layout=c(1,5))
#cut at three points
a <- cutBy(velocity, rows=c(180,410,700), data=pems.1)
latticePlot(velocity~local.time|cut, data=a,
type="l", layout=c(1,4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.