sum: Repeated summation by concatenation

Description Usage Arguments Details Author(s) Examples

Description

Concatenates its arguments to give a single free object

Usage

1
2
## S3 method for class 'free'
sum(..., na.rm = FALSE)

Arguments

...

Objects of class free, to be summed

na.rm

Boolean, indicating whether to ignore NA entries (currently ignored)

Details

Concatenates its arguments and gives a single element of the free group. It works nicely with rev(), see the examples.

Author(s)

Robin K. S. Hankin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
x <- rfree(10,3)
y <- rfree(10,6)
z <- alpha(26)


sum(x)
abelianize(sum(x))


sum(x,y) == sum(sum(x),sum(y))
x+y  # not the same!

sum(x,-x)
sum(x,rev(-x))


stopifnot(sum(x^z) == sum(x)^z)

RobinHankin/freegroup documentation built on Aug. 13, 2019, 3:54 p.m.