Last data update: 2014.03.03

R: Utility methods for manipulating polylist objects
c.polylistR Documentation

Utility methods for manipulating polylist objects

Description

These three functions implement methods for well-known generic functions.

Usage

## S3 method for class 'polylist'
c(..., recursive = FALSE)
## S3 method for class 'polylist'
rep(x, times, ...)
## S3 method for class 'polylist'
unique(x, incomparables = FALSE, ...)

Arguments

...

As for the generic function.

x

As for the generic function.

recursive

As for the generic function.

times

As for the generic function.

incomparables

As for the generic function.

Details

Perform familiar operations, retaining polylist class for the result.

Value

An object of class polylist

Author(s)

Kurt Hornik, slightly modified by Bill Venables

References

None

Examples

p <- poly.from.zeros(-3:4)
p5 <- rep(polylist(p), 5)
p5
p6 <- c(p, p5)
p6
unique(p6)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PolynomF)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PolynomF/c.polylist.Rd_%03d_medium.png", width=480, height=480)
> ### Name: c.polylist
> ### Title: Utility methods for manipulating polylist objects
> ### Aliases: c.polylist rep.polylist unique.polylist
> ### Keywords: symbolmath
> 
> ### ** Examples
> 
> p <- poly.from.zeros(-3:4)
> p5 <- rep(polylist(p), 5)
> p5
List of polynomials:
[[1]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[2]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[3]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[4]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[5]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

> p6 <- c(p, p5)
> p6
[[1]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[2]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[3]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[4]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[5]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

[[6]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

> unique(p6)
[[1]]
144*x - 36*x^2 - 196*x^3 + 49*x^4 + 56*x^5 - 14*x^6 - 4*x^7 + x^8 

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>