Learn R Programming

compositions (version 0.9-11)

as.data.frame: Convert "compositions" classes to data frames

Description

Convert a compositional vector to a dataframe

Usage

## S3 method for class 'acomp':
as.data.frame(x,\dots)
## S3 method for class 'rcomp':
as.data.frame(x,\dots)
## S3 method for class 'aplus':
as.data.frame(x,\dots)
## S3 method for class 'rplus':
as.data.frame(x,\dots)
## S3 method for class 'rmult':
as.data.frame(x,\dots)

Arguments

x
an object to be converted to a dataframe
...
additional arguments are not used

Value

  • a dataframe containing the given data.

Examples

Run this code
data(SimulatedAmounts)
as.data.frame(acomp(sa.groups))
data.frame(acomp(sa.groups),groups=sa.groups.area)

Run the code above in your browser using DataLab