translate: Translate an axis between two sets of identifiers

View source: R/translate.r

translateR Documentation

Translate an axis between two sets of identifiers

Description

Translate an axis between two sets of identifiers

Usage

translate(x, along = 1, to, from = dimnames(x)[[along]], ..., FUN,
  na_rm = FALSE)

Arguments

x

A matrix

along

Along which axis to summarize

to

Names that this dimension should be summarized to

from

Names that match the dimension 'along'

...

Parameters passed to 'match'

FUN

Which function to apply, default is throwing error on aggregation

na_rm

Remove values that were translated to NAs

Value

A summarized matrix as defined by 'from', 'to'


mschubert/arraytools documentation built on Jan. 12, 2023, 8:21 a.m.