R: Remove minuscule coefficients

zap {PolynomF} | R Documentation

## Remove minuscule coefficients

### Description

A convenience function for setting polynomial coefficients likely to be entirely round-off error to zero. The decision is relegated to the function `base::zapsmall`, to which this is a front-end.

### Usage

    zap(x, digits = getOption("digits"))

    ## Default S3 method:
    zap(x, digits = getOption("digits"))

    ## S3 method for class 'polynom'
    zap(x, digits = getOption("digits"))

    ## S3 method for class 'polylist'
    zap(x, digits = getOption("digits"))

    ## S3 method for class 'list'
    zap(x, digits = getOption("digits"))

### Arguments

`x` | A polynomial or polylist object
`digits` | As for `base::zapsmall`

### Value

A polynomial or polylist object with minuscule coefficients set to zero.

### Examples

    (P <- poly_orth(-2:2, norm = FALSE))
    zap(35*P)

[Package PolynomF version 2.0-3 Index]