Learn R Programming

mvp (version 1.0-8)

rmvp: Random multivariate polynomials

Description

Random multivariate polynomials, intended as quick “get you going” examples of mvp objects

Usage

rmvp(n, size = 6, pow = 6, symbols = 6)

Arguments

n

Number of terms to generate

size

Maximum number of symbols in each term

pow

Maximum power of each symbol

symbols

Symbols to use; if numeric, interpret as the first symbols letters of the alphabet

Value

Returns a multivariate polynomial, an object of class mvp

Details

What you see is what you get, basically. A term such as a^2*b*a^3 will be simplified to a^5*b, so powers in the result may be larger than argument pow.

Examples

Run this code
# NOT RUN {
rmvp(5)
rmvp(5,symbols=state.abb)
# }

Run the code above in your browser using DataLab