frab-package {frab}R Documentation

How to Add Two Tables

Description

Methods to "add" two tables; also an alternative interpretation of named vectors as generalized tables, so that c(a=1,b=2,c=3) + c(b=3,a=-1) will return c(b=5,c=3). Uses 'disordR' discipline (Hankin, 2022, <arxiv:2210.03856>). Extraction and replacement methods are provided. The underlying mathematical structure is the Free Abelian group, hence the name. To cite in publications please use Hankin (2023) <arxiv:2307:13184>.

Details

The DESCRIPTION file:

Package: frab
Type: Package
Title: How to Add Two Tables
Version: 0.0-3
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"))
Maintainer: Robin K. S. Hankin <hankin.robin@gmail.com>
Description: Methods to "add" two tables; also an alternative interpretation of named vectors as generalized tables, so that c(a=1,b=2,c=3) + c(b=3,a=-1) will return c(b=5,c=3). Uses 'disordR' discipline (Hankin, 2022, <arxiv:2210.03856>). Extraction and replacement methods are provided. The underlying mathematical structure is the Free Abelian group, hence the name. To cite in publications please use Hankin (2023) <arxiv:2307:13184>.
License: GPL (>= 2)
Depends: R (>= 3.5.0)
Suggests: knitr, markdown, rmarkdown, testthat, mvtnorm
VignetteBuilder: knitr
Imports: Rcpp (>= 1.0-7), mathjaxr, disordR (>= 0.9-8-1), methods
LinkingTo: Rcpp
URL: https://github.com/RobinHankin/frab
BugReports: https://github.com/RobinHankin/frab
RdMacros: mathjaxr
Author: Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)

Index of help topics:

Compare-methods         Comparision methods
arith                   Arithmetic methods for class '"frab"'
extract                 Extraction and replacement methods for class
                        '"frab"'
frab                    Creating 'frab' objects
frab-class              Class "frab"
frab-package            How to Add Two Tables
is.namedvector          Named vectors and the frab package
misc                    Miscellaneous functions
pmax                    Parallel maxima and minima for frabs
print                   Methods for printing frabs
rfrab                   Random frabs
sparsetable             Generalized sparse tables: 'sparsetable'
                        objects
table                   Tables and frab objects
zero                    The zero frab object

Author(s)

NA

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

Examples

x <- frab(c(a=1, b=2, c=5))
y <- frab(c(b=-2, c=1, d=8))

x+y


[Package frab version 0.0-3 Index]