Learn R Programming

funcharts (version 1.8.0)

minus_mfd: Subtract multivariate functional data (and unary negation)

Description

Subtracts two objects of class mfd (elementwise on their coefficient arrays). The same basis, variable-count, and observation-replication rules as in plus_mfd apply. If mfdobj2 is missing, returns the unary negation of mfdobj1.

Usage

minus_mfd(mfdobj1, mfdobj2)

# S3 method for mfd -(mfdobj1, mfdobj2)

Value

An object of class mfd with coefficients equal to the (possibly replicated) difference mfdobj1 - mfdobj2, or the negation of mfdobj1 for unary minus.

Arguments

mfdobj1, mfdobj2

Objects of class mfd. If mfdobj2 is missing, unary minus is applied to mfdobj1.

See Also

plus_mfd, nobs, nbasis, nvar, mfd

Examples

Run this code
# mfdobj_a - mfdobj_b
# minus_mfd(mfdobj_a, mfdobj_b)
# Unary minus:
# -mfdobj_a

Run the code above in your browser using DataLab