Learn R Programming

onion (version 1.5-3)

condense: Condense an onionic vector into a short form

Description

Condense an onion into a string vector showing whether the elements are positive, zero or negative.

Usage

condense(x,as.vector=FALSE)

Value

If as.vector is TRUE, return a string vector of the same length as x whose elements are length 4 or 8 strings for quaternions or octonions respectively. If FALSE, return a matrix with these columns.

The characters are “+” for a positive, “-

for a negative, and “0” for a zero, element.

Arguments

x

An onionic vector

as.vector

Boolean, indicating whether to return a vector or matrix

Author

Robin K. S. Hankin

Examples

Run this code
condense(roct(3))
condense(roct(3),as.vector=TRUE)

Run the code above in your browser using DataLab