t: Matrix Transpose

tR Documentation

Matrix Transpose

Description

Matrix Transpose

Usage

## S4 method for signature 'NumericMatrix'
t(x)

Arguments

x

An R object (typically, a CompositionMatrix object).

Value

A matrix, with dim and dimnames constructed appropriately from those of x.

Note

Implemented only to ensure that t() always returns a base matrix.

Author(s)

N. Frerebeau

Examples

## Create a count matrix
A1 <- matrix(data = sample(100, 100, TRUE), nrow = 20)

## Coerce to compositions
B <- as_composition(A1)

## Row sums are internally stored before coercing to relative frequencies
totals(B)

## This allows to restore the source data
A2 <- as_amounts(B)

## Coerce to a data.frame
X <- as.data.frame(B)
head(X)

nexus documentation built on June 23, 2026, 9:06 a.m.