# runif: The uniform distribution on the simplex In compositions: Compositional Data Analysis

## Description

Generates random compositions with a uniform distribution on the (rcomp) simplex.

## Usage

 1 2 3 runif.acomp(n,D) runif.rcomp(n,D)

## Arguments

 n number of datasets to be simulated D number of parts

## Value

a generated random dataset of class "acomp" or "rcomp" drawn from a uniform distribution on the simplex of D parts.

## Note

The only difference between both routines is the class of the dataset returned.

## Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

## References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.

## Examples

 1 2 plot(runif.acomp(10,3)) plot(runif.rcomp(10,3))

### Example output

Attaching package: 'tensorA'

The following object is masked from 'package:base':

norm

Welcome to compositions, a package for compositional data analysis.
Find an intro with "? compositions"

Attaching package: 'compositions'

The following objects are masked from 'package:stats':

cor, cov, dist, var

The following objects are masked from 'package:base':

%*%, scale, scale.default

Warning messages:
1: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
2: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
3: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
4: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
5: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
6: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
7: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
Warning messages:
1: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
2: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
3: In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.

compositions documentation built on June 14, 2018, 5:03 p.m.