FD.amalgamation: Amalgamation

Description Usage Arguments Details See Also Examples

Description

Given a matrix or a numeric dataframe, this function returns a composition where a set of specified columns is amalgamated together. The compositional operation of amalgamation provides sums of composition elements aimed at grouping homogeneous parts of the whole.

Usage

1

Arguments

data

a matrix or a dataframe containing only variables to be transformed into compositional variables, after amalgamation.

columns

numeric vector containing the position of the columns to be amalgamated together.

name

string containing the name of the new column resulted from the amalgamation.

Details

Values must be positive. In case one row-entry (or more) is NA, the whole row will be returned as NA.

See Also

FD.generate, FD.subcomposition, FD.normalization

Examples

1
2
3
4
5
6
7
8
9
data(oliveoil)
dataoil <- oliveoil
head(dataoil)
data <- FD.normalization(dataoil[,3:10])
head(data)
data.sub <- FD.subcomposition(data,c(1,3,4,5))
head(data.sub)
data.amalg <- FD.amalgamation(data,c(2,6,7,8),name='others')
head(data.amalg)

FlexDir documentation built on May 2, 2019, 5:52 a.m.