curve_set | R Documentation |
Create a curve_set object out of data provided in the right form.
curve_set(
obs,
sim = NULL,
r = NULL,
theo = NULL,
allfinite = FALSE,
verbose = TRUE
)
create_curve_set(curve_set, allfinite = FALSE, verbose = TRUE)
obs |
The observed data. See details. |
sim |
The simulated data. See details. |
r |
The argument values where the functions/vectors have been observed (or simulated). See details. |
theo |
The theoretical function. See details. |
allfinite |
Logical. TRUE requires that all values of the curves must be
finite (not infinite and not missing, see |
verbose |
Logical flag indicating whether to warn about the content. |
curve_set |
A list containing the element obs, and optionally the elements r, sim_m (same as sim, but in matrix format only) and theo. See details. |
The functions are used to clump together the functional data in the form
that can be handled by the other GET functions (forder
,
central_region
, global_envelope_test
etc.).
The functions take care of checking the content of the data,
and save relevant information of the curves for global envelope
methods to be used in particular for plotting the results with graphical
interpretation.
obs
must be either
a vector containing the data function/vector, or
a matrix containing the s data functions/vectors, in which case it is assumed that each column corresponds to a data function/vector, or
a list containing the s data functions/vectors.
If obs
is a vector, sim
must be either
a matrix containing the simulated functions/vectors, each column
corresponding to a function/vector and the number of rows matching the length
of obs
, or
a list containing the simulated functions/vectors.
If obs
is a matrix or a list, sim
is ignored.
If given, r
describes the 1- or 2-dimensional argument values where the functions/vectors
have been observed (or simulated). It must be either
a vector,
a data.frame with columns "x", "y", "width" and "height", where the width and height give the width and height of the pixels placed at x and y, or
a data.frame with columns "xmin", "xmax", "ymin" and "ymax" giving the corner coordinates of the pixels where the data have been observed.
If obs
is a vector, theo
can be given and it should then correspond
to a theoretical function (e.g., under the null hypothesis). If present, its
length must match the length of obs
.
An object of class curve_set
containing the data.
If the argument values are two-dimensional, then the curve_set
is additionally
a curve_set2d
object.
plot.curve_set
, plot.curve_set2d
# 1d
cset <- curve_set(r = 1:10, obs = matrix(runif(10*5), ncol=5))
plot(cset)
# 2d
cset <- curve_set(r = data.frame(x=c(rep(1:3, 3), 4), y=c(rep(1:3, each=3), 1),
width=1, height=1),
obs = matrix(runif(10*5), ncol=5))
plot(cset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.