expand: Expand

Description Usage Arguments Value See Also Examples

View source: R/dice.R

Description

Expand a "table", a "table"-like object, or a list of "table"-like objects

Usage

1
expand(x, ...)

Arguments

x

an object to be expanded

...

further arguments passed to or from methods

Value

A vector with values and their repetitions specified by x

See Also

dice, table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x <- c(4, 2, 2, 2, 3, 3, 2, 4, 6, 6)
(xt <- table(x))
(xd <- dice(x))

expand(xt)
expand(xd)

expand(list(xt, xd, x))

xn <- as.table(1:4)
names(xn) <- LETTERS[1:length(xn)]
expand(xn)

AkselA/R-ymse documentation built on March 21, 2020, 9:52 a.m.