generate_indices {ehymet} | R Documentation |
Create a dataset with indices from a functional dataset in one or multiple dimensions
Description
Create a dataset with indices from a functional dataset in one or multiple dimensions
Usage
generate_indices(
curves,
k,
grid,
bs = "cr",
indices = c("EI", "HI", "MEI", "MHI"),
...
)
Arguments
curves |
|
k |
Number of basis functions for the B-splines. If equals to 0, the number of basis functions will be automatically selected. |
grid |
Atomic vector of type numeric with two elements: the lower limit and the upper limit of the evaluation grid. If not provided, it will be selected automatically. |
bs |
A two letter character string indicating the (penalized) smoothing
basis to use. See |
indices |
Set of indices to be applied to the dataset. They should be any between EI, HI, MEI and MHI. |
... |
Additional arguments (unused) |
Value
A dataframe containing the indices provided in indices
for
original data, first and second derivatives
Examples
x1 <- array(c(1, 2, 3, 3, 2, 1, 5, 2, 3, 9, 8, 7, -1, -5, -6, 2, 3, 0, -1, 0, 2, -1, -2, 0),
dim = c(3, 4, 2)
)
generate_indices(x1, k = 4)
x2 <- matrix(c(1, 2, 3, 3, 2, 1, 5, 2, 3, 9, 8, 7), nrow = 3, ncol = 4)
generate_indices(x2, k = 4)