Coerce an Object to imgClass
as.imgClass.Rd
Converts an object of class rdClass
or fdClass
to an imgClass
,
while preserving or overriding associated attributes such as smoothing, sparsity,
and grid points.
Arguments
- x
An object of class
rdClass
orfdClass
.- Sparsity_parameter
Optional. A numeric vector of non-negative integers representing sparsity levels to apply. If
NULL
, the parameter is inherited fromx
.- Smoothing_parameter
Optional. A numeric value or vector representing smoothing parameters. If
NULL
, the parameter is inherited fromx
.- argval
Optional. A numeric vector of grid points (argvals) for functional representation. If
NULL
, the grid is inherited fromx
.
Value
An object of class imgClass
, which also inherits from fdClass
or rdClass
,
depending on the smoothing parameter.