Coerce an object of class 'rdClass' or 'imgClass' to class 'fdClass'.
as.fdClass.Rd
Coerce an object of class 'rdClass' or 'imgClass' to class 'fdClass'.
Examples
img_object <- imgClass(
image = list(matrix(rnorm(100), nrow = 10), matrix(rnorm(100), nrow = 10)),
argval = NULL,
Smoothing_parameter = NULL,
Sparsity_parameter = 0
)
newfd <- as.fdClass(img_object)
newfd
#> Functional Data (fdClass) Object
#> -----------------------------------
#> Dimensions: 2 x 100
#> Smoothing Parameter: 9.313226e-10 1.379661e-08 2.043829e-07 ... 2.160119 32
#> Sparsity Parameter: 0
#> GridPoints_v: 0.01 0.02 0.03 ... 0.99 1
#> -----------------------------------
#> First few rows and columns of the data:
#> V1 V2 V3 V4 V5
#> [1,] 0.2553171 0.628982 0.3629513 0.1764886 -0.6391233
#> [2,] -0.7854327 -1.399410 0.4494538 0.8461847 -0.8273102