Learn R Programming

⚠️There's a newer version (2.0-9) of this package.Take me there.

compositions (version 0.9-11)

Compositional Data Analysis

Description

The package provides functions for the consistent analysis of compositional data (e.g. portions of substances) and positive numbers (e.g. concentrations) in the way proposed by Aitchison.

Copy Link

Version

Install

install.packages('compositions')

Monthly Downloads

17,456

Version

0.9-11

License

GPL version 2 or newer

Maintainer

K Gerald van den Boogaart

Last Published

August 21st, 2025

Functions in compositions (0.9-11)

clr2ilr

Convert between clr and ilr, and between cpt and ipt. Acts in vectors and in bilinear forms.
perturbe

Perturbation of compositions
segments

Draws straight lines from point to point.
gsiinternal1

Internal functions of the compositions package
rmult

Simple treatment of real vectors
ult

Uncentered log transform
split

Spliting datasets in groups given by factors
gsi.margin

Internal function: Compute a desired compositional margin
alr

Additive log ratio transform
clo

Closure of a composition
normalize

Normalize vectors to norm 1
princomp.rplus

Principal component analysis for real amounts
kingTetrahedron

Ploting composition into rotatable tetrahedron
plot.aplus

Displaying amounts in scatterplots
var.acomp

Variances and covariances of amounts and compositions
gsi.add

Internal functions: Parallel operations of single and multiple datasets
gsi.eps

Internal variable: Negligible differences
gsi.plain

Internal function: Convert to plain vector or matrix
gsi.textpanel

Internal function: A panel displaying a label only
ilt

Isometric log transform
gsi.isSingleRow

Internal function: Can something be considered as a single multivariate data item?
gsipairs

Internal functions of the compositions package
gsiinternal

Internal functions of the compositions package
rcomp

Compositions as elements of the Simplex embedded in the D-dimensional real space
rmultmatmult

inner product for datasets with vector scale
gsi.diagGenerate

Internal functions: Generate a diagonal matrix
ipt

Isometric planar transform
gsi.addclass

Internal function: give an object a derived subclass
ratioLoadings

Loadings of relations of two amounts
rDirichlet

Dirichlet distribution
gsi.mapin01

Internal functions: Storing integers as reals
rlnorm

The multivariate lognormal distribution
summary.acomp

Summarizing a compositional dataset in terms of ratios
apt

Additive planar transform
straight

Draws infinite straight lines.
cor.acomp

Correlations of amounts and compositions
rnorm

Normal distributions on special spaces
rmultarithm

vectorial arithmetic for datasets in a classical vector scale
summary.aplus

Summaries of amounts
Hydrochem

Hydrochemical composition data set of Llobregat river basin water (NE Spain)
gsi.expandrcomp

Internal function: Scaling rcomp
dist

Distances in variouse approaches
acomparith

Power transform in Aitchisons simplex
groupparts

Group amounts of parts
idt

Isometric default transform
geometricmean

The geometric mean
acompmargin

Marginal compositions in Aitchison Compositions
ilrBase

The canonical basis in the clr plane used for ilr and ipt transforms.
gsi.drop

Internal functions: A conditional drop
SimulatedAmounts

Simulated amount datasets
matmult

inner product for matrices and vectors
princomp.acomp

Principal component analysis for Aitchison compositions
aplus

Amounts analysed in log-scale
clr

Centered log ratio transform
ellipses

Draw ellipses
norm

Vector space norm
rcomparithm

Arithmetic operations for composition in real geometry
mvar

Metric summary statistics of real, amount or compositional data
gsicall

Internal functions of the compositions package
gsiCoorInfo

Internal functions of the compositions package
cpt

Centered planar transform
rplusarithm

Arithmetik of rplus-scale
ilr

Isometric log ratio transform
meanrow

The arithmetic mean of rows or columns
plot.acomp

Displaying compositions in ternary diagrams
gsiinternal2

Internal functions of the compositions package
gsi.diagExtract

Internal functions: Get the diagonal of a matrix
gsi2.invperm

Internal function: Invert a permutation
variation

Variation matrices of amounts and compositions
cdt

Centered default transform
mean.acomp

Mean amounts and mean compositions
qqnorm

Normal quantile plots for compositions and amounts
endpointCoordinates

Amounts in barytic-coordinates
Read standard data files

Reads a data file in a geoeas format
barplot.acomp

Barcharts of amounts
gsi.simshape

Internal function: Reshape an object to the shape type of another
is.acomp

Check for compositional data type
rplus

Amounts i.e. positive numbers analysed as objects of the real vector space
acomp

Aitchison compositions
powerofpsdmatrix

power transform of a matrix
as.data.frame

Convert "compositions" classes to data frames
aplusarithm

vectorial arithmetic for datasets with aplus class
scale

Normalizing datasets by centering and scaling
gsi.getD

Interal function: Get number of samples and number of parts in a compositional object
oneOrDataset

Treating single compositions as one-row datasets
boxplot

Displaying compositions and amounts by boxplots
princomp.rmult

Principle component analysis for Real data
iit

Isometric identity transform
acompscalarproduct

inner product for datasets with a vector space structure
princomp.rcomp

Principal component analysis for real compositions
gsiinternal3

Internal functions of the compositions package
rcompmargin

Marginal compositions in real geometry
princomp.aplus

Principal component analysis for amounts in log geometry
names

The names of the parts
totals

Total sum of amounts
lines

Draws connected lines from point to point.
isoPortionLines

Isoportion- and Isoproportion-lines
scalar

Parallel scalar products
runif

The uniform distribution on the simplex
summary.rcomp

Summary of compositions in real geometry