Learn R Programming

narray (version 0.5.1)

translate: 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)

Value

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

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