atotal: Add all marginal sums to an array

View source: R/tab.R

atotalR Documentation

Add all marginal sums to an array

Description

atotal adds by default a border of sums to an array. The function FUN may be used instead of 'sum'. Additional arguments to FUN can also be given.

Usage

atotal(arr, FUN = sum, label = "Total", ...)

Arguments

arr

array for which margins need to be added

FUN

function to compute margins, default: sum

label

for margin, default: 'Total'

...

additional arguments to 'FUN'

Value

an array with dimension dim(arr) + 1

Author(s)

Georges Monette


gmonette/spida2 documentation built on Aug. 11, 2024, 7:52 p.m.