Learn R Programming

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

compositions (version 2.0-6)

Compositional Data Analysis

Description

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 J. Aitchison and V. Pawlowsky-Glahn.

Copy Link

Version

Install

install.packages('compositions')

Monthly Downloads

9,116

Version

2.0-6

License

GPL (>= 2)

Maintainer

K Gerald van den Boogaart

Last Published

April 13th, 2023

Functions in compositions (2.0-6)

Blood23

Blood samples
ClamWest

Color-size compositions of 20 clam colonies from West Bay
ArcticLake

Artic lake sediment samples of different water depth
Boxite

Compositions and depth of 25 specimens of boxite
Bayesite

Permeabilities of bayesite
Aar

Composition of glaciar sediments from the Aar massif (Switzerland)
Activity31

Activity patterns of a statistician for 20 days
Activity10

Activity patterns of a statistician for 20 days
ClamEast

Color-size compositions of 20 clam colonies from East Bay
AnimalVegetation

Animal and vegetation measurement
Firework

Firework mixtures
CompLinModCoReg

Compositional Linear Model of Coregionalisation
Glacial

Compositions and total pebble counts of 92 glacial tills
ConfRadius

Helper to compute confidence ellipsoids
DiagnosticProb

Diagnostic probabilities
Coxite

Compositions, depths and porosities of 25 specimens of coxite
HouseholdExp

Household Expenditures
Sediments

Proportions of sand, silt and clay in sediments specimens
SerumProtein

Serum Protein compositions of blood samples
Metabolites

Steroid metabolite patterns in adults and children
Hydrochem

Hydrochemical composition data set of Llobregat river basin water (NE Spain)
Kongite

Compositions of 25 specimens of kongite
Skulls

Measurement of skulls
Hongite

Compositions of 25 specimens of hongite
Supervisor

Proportions of supervisor's statements assigned to different categories
Yatquat

Yatquat fruit evaluation
SkyeAFM

AFM compositions of 23 aphyric Skye lavas
amounts-class

Class "amounts"
ShiftOperators

Shifts of machine operators
acomp-class

Class "acomp"
HotellingsTsq

Hotellings T square distribution
PogoJump

Honk Kong Pogo-Jumps Championship
acomparith

Power transform in the simplex
as.data.frame

Convert "compositions" classes to data frames or matrices
acomp

Aitchison compositions
SimulatedAmounts

Simulated amount datasets
R2

R square
aplus-class

Class "aplus"
aplus

Amounts analysed in log-scale
apt

Additive planar transform
acompmargin

Marginal compositions in Aitchison Compositions
alr

Additive log ratio transform
WhiteCells

White-cell composition of 30 blood samples by two different methods
biplot3D

Three-dimensional biplots, based on package rgl
axis3D

Drawing a 3D coordiante system to a plot, based on package rgl
boxplot

Displaying compositions and amounts with box-plots
backtransform

Automatic common backtransformation for compositions
aplusarithm

vectorial arithmetic for data sets with aplus class
arrows3D

arrows in 3D, based on package rgl
balance

Compute balances for a compositional dataset.
colorsForOutliers

Create a color/char palette or for groups of outliers
compOKriging

Compositional Ordinary Kriging
ccomp-class

Class "ccomp"
CoDaDendrogram

Dendrogram representation of acomp or rcomp objects
clo

Closure of a composition
ccompgof

Compositional Goodness of fit test
clr

Centered log ratio transform
barplot.acomp

Bar charts of amounts
groupparts

Group amounts of parts
cdt

Centered default transform
gsi.PrinBal

The canonical basis in the clr plane used for ilr and ipt transforms.
missing.compositions

The policy of treatment of missing values in the "compositions" package
gsiCoorInfo

Internal functions of the compositions package
getdetectionlimit

Gets the detection limit stored in the data set
compositional-class

Class "compositional"
clr2ilr

Convert between clr and ilr, and between cpt and ipt.
binary

Treating binary and g-adic numbers
coloredBiplot

A biplot providing somewhat easier access to details of the plot.
gof

Compositional Goodness of fit test
gausstest

Classical Gauss Test
gsi.add

Internal functions: Parallel operations of single and multiple datasets
compositions-package

tools:::Rd_package_title("compositions")
ClusterFinder1

Heuristics to find subpopulations of outliers
geometricmean

The geometric mean
cor.acomp

Correlations of amounts and compositions
fitdirichlet

Fitting a Dirichlet distribution
cpt

Centered planar transform
gsi.addclass

Internal function: give a derived subclass to an object
ccomp

Count compositions
gsicall

Internal functions of the compositions package
gsiinternal2

Internal functions of the compositions package
gsipairs

Internal functions of the compositions package
gsi.expandrcomp

Internal function: Scaling rcomp
dist

Distances in variouse approaches
fitSameMeanDifferentVarianceModel

Fit Same Mean Different Variance Model
gsi.diagExtract

Internal functions: Get the diagonal of a matrix
gsi.csum

Internal function: row and column sums of matrices
ellipses

Draw ellipses
gsi.varwithlosts

Internal function: computes variance of compositional data set with missing/zero values
endmemberCoordinates

Recast amounts as mixtures of end-members
gsi.diagGenerate

Internal functions: Generate a diagonal matrix
gsiinternal1

Internal functions of the compositions package
gsifiltercall

Calling from a function with the own parameters
gsi.margin

Internal function: Compute a desired compositional margin
gsiinternal

Environment containing the old gsi functions
gsiplotmargin

Internal functions of the compositions package
gsi.plain

Internal function: Convert to plain vector or matrix
gsigetBalStruct

An auxiliary functions to compute user-defined ilr and ipt transforms.
ipt

Isometric planar transform
gsi2.invperm

Internal function: Invert a permutation
gsi.merge2signary

Auxiliary functions to compute user-defined ilr and ipt transforms.
gsi.getD

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

Isometric identity transform
gsi.svdsolve

Internal function: Solves singular and non square equation systems
gsi.simshape

Internal function: Reshape an object to the shape type of another
gsi.textpanel

Internal function: A panel displaying a label only
gsi.eq

Internal function: Checking equality of IEEE special numbers
gsi.drop

Internal functions: A conditional drop
idt

Isometric default transform
gsi.isSingleRow

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

Density estimation on the simplex with Dirichlet kernel
jura

The jura dataset
ilr

Isometric log ratio transform
is.acomp

Check for compositional data type
mean.acomp

Mean amounts and mean compositions
meanrow

The arithmetic mean of rows or columns
acompscalarproduct

inner product for datasets with a vector space structure
gsiinternal3

Internal functions of the compositions package
missingProjector

Returns a projector the the observed space in case of missings.
MahalanobisDist

Compute Mahalanobis distances based von robust Estimations
matmult

inner product for matrices and vectors
IsMahalanobisOutlier

Checking for outliers
pairs

Pairs plot method for compositions
parametricMat

Unique parametrisations for matrices.
gsi.mapin01

Internal functions: Storing integers as reals
plot3Daplus

3D-plot of positive data
isoPortionLines

Isoportion- and Isoproportion-lines
mix.Read

Reads a data file in a mixR format
mvar

Metric summary statistics of real, amount or compositional data
ilrBase

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

Internal function: Recode missings with IEEE number and vice versa
gsireset3D

Internal functions of the compositions package
transformations from 'mixtures' to 'compositions' classes

Transformations from 'mixtures' to 'compositions' classes
ilt

Isometric log transform
plot3Drmult

plot in 3D based on rgl
rDirichlet

Dirichlet distribution
missingsummary

Classify and summarize missing values in a dataset
logratioVariogram

Empirical variograms for compositions
lrvgram

vgram2lrvgram
plot.acomp

Ternary diagrams
perturbe

Perturbation of compositions
princomp.aplus

Principal component analysis for amounts in log geometry
plot3D

plot in 3D based on rgl
princomp.rmult

Principal component analysis for real data
princomp.rplus

Principal component analysis for real amounts
Read standard data files

Reads a data file in a geoeas format
rcompmargin

Marginal compositions in real geometry
norm

Vector space norm
names

The names of the parts
kingTetrahedron

Ploting composition into rotable tetrahedron
lines

Draws connected lines from point to point.
outliersInCompositions

Analysing outliers in compositions.
princomp.rcomp

Principal component analysis for real compositions
plot3Dacomp

3D-plot of compositional data
plotlogratioVariogram

Empirical variograms for compositions
plot3Drplus

plot in 3D based on rgl
rAitchison

Aitchison Distribution
pairwiseplot

Creates a paneled plot like pairs for two different datasets.
rcomparithm

Arithmetic operations for compositions in a real geometry
rcomp

Compositions as elements of the simplex embedded in the D-dimensional real space
pwlrPlot

Plots of pairwise logratio against a covariable.
ratioLoadings

Loadings of relations of two amounts
qqnorm

Normal quantile plots for compositions and amounts
powerofpsdmatrix

power transform of a matrix
rcomp-class

Class "rcomp"
scalar

Parallel scalar products
scale

Normalizing datasets by centering and scaling
rpois

Simulate count compositions without overdispersion
princomp.acomp

Principal component analysis for Aitchison compositions
runif

The uniform distribution on the simplex
summary.rcomp

Summary of compositions in real geometry
oneOrDataset

Treating single compositions as one-row datasets
rmultmatmult

inner product for datasets with vector scale
normalize

Normalize vectors to norm 1
sumprojector

Compute the global projector to the observed subspace.
outlierclassifier

Detect and classify compositional outliers.
outlierplot

Plot various graphics to analyse outliers.
plotmissingsummary

Plot a Missing Summary
rmult

Simple treatment of real vectors
print.acomp

Printing compositional data.
pwlr

Pairwise log ratio transform
plot.aplus

Displaying amounts in scatterplots
rnorm

Normal distributions on special spaces
replot

Modify parameters of compositional plots.
rmultarithm

vectorial arithmetic for datasets in a classical vector scale
rmult-class

Class "rmult"
rMahalanobis

Compute distributions of empirical Mahalanobis distances based on simulations
rlnorm

The multivariate lognormal distribution
rplus

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

Compositional variogram model fitting
NormalTests

Compositional Goodness of fit test
ternaryAxis

Axis for ternary diagrams
simulatemissings

Artifical simulation of various kinds of missings/polluted data
robustnessInCompositions

Handling robustness issues and outliers in compositions.
wrapped_functions

Standard R functions wrapped for compatibility
rplus-class

Class "rplus"
straight

Draws straight lines.
subsetting

Subsetting of compositions
variation

Variation matrices of amounts and compositions
summary.acomp

Summarizing a compositional dataset in terms of ratios
split

Splitting datasets in groups given by factors
varmlm

Residual variance of a model
variograms

Variogram functions
zeroreplace

Zero-replacement routine
summary.aplus

Summaries of amounts
rplusarithm

vectorial arithmetic for data sets with rplus class
vcovAcomp

Variance covariance matrix of parameters in compositional regression
ult

Uncentered log transform
simplemissingplot

Ternary diagrams
segments

Draws straight lines from point to point.
tryDebugger

Empirical variograms for compositions
totals

Total sum of amounts
var.acomp

Variances and covariances of amounts and compositions