spray (version 1.0-25)

rspray: Random spray objects

Description

Creates random spray objects as quick-and-dirty examples of multivariate polynomials

Usage

rspray(n=9, vals = seq_len(n), arity = 3, powers = 0:2)

Value

Returns a spray object

Arguments

n

Number of distinct rows (maximum); repeated rows are merged (argument addrepeats is TRUE)

vals

Values to use for coefficients

arity

Arity of the spray; the number of columns in the index matrix

powers

Set from which to sample the entries of the index matrix

Author

Robin K. S. Hankin

See Also

spray

Examples

Run this code

rspray()

rspray(4)*rspray(3,rnorm(3))

rspray(3,arity=7,powers=-2:2)^3

rspray(1000,vals=rnorm(1000))

Run the code above in your browser using DataLab