onion (version 1.2-7)

roct: Random onionic vector

Description

Returns a random onionic vector of arbitrary length

Usage

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.

Examples

Run this code
# NOT RUN {
roct(3)
plot(roct(30))
# }

Run the code above in your browser using DataCamp Workspace