Learn R Programming

mvp (version 1.0-12)

rmvp: Random multivariate polynomials

Description

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

Usage

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

Value

Returns a multivariate polynomial, an object of class mvp

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

Author

Robin K. S. Hankin

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
rmvp()
rmvp(5,symbols=state.abb)

Run the code above in your browser using DataLab