roct: Random onionic vector

Description Usage Arguments Details Note Author(s) Examples

Description

Returns a random onionic vector of arbitrary length

Usage

1
2
roct(n, x=1:8, replace=TRUE, rand="sample", ...)
rquat(n, x=1:4, replace=TRUE, rand="sample", ...)

Arguments

n

Length of onionic vector returned

x

Argument x as passed to sample(); only matters if rand takes its default value of “sample”.

replace

Argument replace as passed to sample(); only matters if rand takes its default value of “sample”.

rand

String, with name being that of the distribution intended. Currently implemented values are “sample” (default), “norm”, “unif”, “binom” and “pois”. Add an “r” to get the name of the function used; thus “unif” means to call runif().

...

Further arguments passed to the random number generator (such as mean and sd, which would be passed to rnorm())

Details

Function rquat() returns a quaternionic vector and function roct() returns an octonionic vector.

Note

Arguments x and replace are there (and have the default values they do) in order to make roct(n) return a “get you going” random onion that prints relatively compactly.

Author(s)

Robin K. S. Hankin

Examples

1
2
roct(3)
plot(roct(30))

onion documentation built on July 11, 2017, 9:04 a.m.