Learn R Programming

fdars (version 0.3.3)

Ops.fdata: Arithmetic Operations for Functional Data

Description

Perform elementwise arithmetic on fdata objects. Supports addition, subtraction, multiplication, division, and exponentiation between two fdata objects or between an fdata object and a numeric scalar.

Usage

# S3 method for fdata
Ops(e1, e2)

Value

An fdata object with the result.

Arguments

e1, e2

Objects of class fdata or numeric scalars. At least one must be of class fdata.

Examples

Run this code
fd1 <- fdata(matrix(1:20, 4, 5))
fd2 <- fdata(matrix(21:40, 4, 5))
fd1 + fd2
fd1 * 2
3 - fd1

Run the code above in your browser using DataLab