Learn R Programming

stokes (version 1.2-1)

zap: Zap small values in \(k\)-forms and \(k\)-tensors

Description

Equivalent to zapsmall()

Usage

zap(X)
# S3 method for kform
zap(X)
# S3 method for ktensor
zap(X)

Value

Returns an object of the same class

Arguments

X

Tensor or \(k\)-form to be zapped

Author

Robin K. S. Hankin

Details

Given an object of class ktensor or kform, coefficients close to zero are ‘zapped’, i.e., replaced by ‘0’, using base::zapsmall().

Note, zap() actually changes the numeric value, it is not just a print method.

Examples

Run this code

S <- rform(7)
S == zap(S)

Run the code above in your browser using DataLab