onion-package {onion}R Documentation

Octonions and Quaternions

Description

Quaternions and Octonions are four- and eight- dimensional extensions of the complex numbers. They are normed division algebras over the real numbers and find applications in spatial rotations (quaternions), and string theory and relativity (octonions). The quaternions are noncommutative and the octonions nonassociative. See the package vignette for more details.

Details

Package: onion
Version: 1.5-3
Title: Octonions and Quaternions
LazyData: TRUE
Authors@R: person(given=c("Robin", "K. S."), family="Hankin", role = c("aut","cre"), email="hankin.robin@gmail.com", comment = c(ORCID = "0000-0001-5982-0415"))
Description: Quaternions and Octonions are four- and eight- dimensional extensions of the complex numbers. They are normed division algebras over the real numbers and find applications in spatial rotations (quaternions), and string theory and relativity (octonions). The quaternions are noncommutative and the octonions nonassociative. See the package vignette for more details.
Maintainer: Robin K. S. Hankin <hankin.robin@gmail.com>
License: GPL-2
Depends: methods, R (>= 3.5.0)
Suggests: testthat,knitr,rmarkdown,covr
VignetteBuilder: knitr
Imports: emulator, Matrix, freealg (>= 1.0-4), mathjaxr
URL: https://github.com/RobinHankin/onion
BugReports: https://github.com/RobinHankin/onion/issues
RdMacros: mathjaxr
Author: Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)

Index of help topics:

adjoint                 The adjoint map
Arith                   Methods for Function Arith in package Onion
biggest                 Returns the biggest type of a set of onions
bind                    Binding of onionmats
bunny                   The Stanford Bunny
c                       Concatenation
Compare-methods         Methods for compare S4 group
condense                Condense an onionic vector into a short form
cumsum                  Cumulative sums and products of onions
dot-class               Class "dot"
drop                    Drop zero imaginary parts of an onionic vector
i                       Extract or Replace Parts of onions or glubs
length                  Length of an octonionic vector
log                     Various logarithmic and circular functions for
                        onions
logic.onion             Logical operations on onions
names.onion             Names of an onionic vector
O1                      Unit onions
onion                   Basic onion functions
onion-class             Class "onion"
onion-package           Octonions and Quaternions
onionmat                Onionic matrices
orthogonal              Orthogonal matrix equivalents
p3d                     Three dimensional plotting
plot                    Plot onions
prods                   Various products of two onions
Re                      Complex functionality for onions
rep                     Replicate elements of onionic vectors
roct                    Random onionic vectors
rotate                  Rotates 3D vectors using quaternions
round                   Rounding of onions
seq                     seq method for onions
show                    Print method for onions
sum                     Various summary statistics for onions
threeform               Various non-field diagnostics
zapsmall                Concatenation

There are precisely four normed division algebras over the reals: the reals themselves, the complex numbers, the quaternions, and the octonions. The R system is well equipped to deal with the first two: the onion package provides some functionality for the third and fourth.

Author(s)

Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)

Maintainer: Robin K. S. Hankin <hankin.robin@gmail.com>

References

R. K. S. Hankin 2006. “Normed division algebras in R: introducing the onion package”. R News, Volume 6, number 2

Examples

rquat(10)   # random quaternions

Ok + (Oi + Ojl)/(Oj-Oil)  # basic octonions

x <- roct(10)
y <- roct(10)
z <- roct(10)

x*(y*z) - (x*y)*z   # nonassociative!



[Package onion version 1.5-3 Index]