plus-.fData {roahd} | R Documentation |
Operator +
and -
for fData
objects
Description
These methods provide operators +
and -
to perform sums
or differences between an fData
object and either another
fData
object or other compliant data structures, like matrices or
vectors or arrays, representing the pointwise measurements of the second
term of the sum.
Usage
## S3 method for class 'fData'
fD + A
## S3 method for class 'fData'
fD - A
Arguments
fD |
the univariate functional dataset in form of |
A |
either an |
Details
If the second term of the operation is an fData
object, it must be
defined over the same grid as the first.
Value
The function returns an fData
object, whose function values
have undergone the sum/difference.
Examples
fD = fData( seq( 0, 1, length.out = 10 ),
values = matrix( seq( 1, 10 ),
nrow = 21, ncol = 10, byrow = TRUE ) )
fD + 1 : 10
fD + array( 1, dim = c( 1, 10 ) )
fD + fD
fD = fData( seq( 0, 1, length.out = 10 ),
values = matrix( seq( 1, 10 ),
nrow = 21, ncol = 10, byrow = TRUE ) )
fD - 2 : 11
fD - array( 1, dim = c( 1, 10 ) )
fD - fD