vector3_math: Mathematical operations on vectors

vector3_mathR Documentation

Mathematical operations on vectors

Description

Some summary and cumulant functions can apply to vectors as well. In particular, 'mean', 'sum', and 'cumsum' have meanings when applied to vector3s.

Usage

## S3 method for class 'dddr_vector3'
vec_math(.fn, .x, ...)

Arguments

.fn

Mathematical function to apply

.x

Argument to the function

...

Unused; reserved for extensibility

Examples

mean(vector3(x = 1:4, y = 2:5, z = 3:6))
sum(vector3(x = 1:4, y = 2:5, z = 3:6))
cumsum(vector3(x = 1:4, y = 2:5, z = 3:6))

MrMallIronmaker/dddr documentation built on May 11, 2022, 8:39 p.m.