format_fclust: Format a raw dataset for a functional clustering

Description Usage Arguments Details Value

View source: R/fclust.R

Description

Fit a raw dataset, then format it as n input for the function fclust.

Usage

1
2
format_fclust(dat, nbElt, weight = rep(1, dim(dat)[2] - nbElt - 1),
              opt.na = FALSE, opt.repeat = FALSE, opt.mean   )

Arguments

dat

a data.frame or matrix that brings together: a vector of assemblage identity, a matrix of occurrence of components within the system, one or more vectors of observed performances. Consequently, the data.frame or matrix dimensions are: dim(dat)[1]= the number of observed assemblages, * dim(dat)[2]= 1 + number of system components + number of observed performances. On a first line (colnames): assemblage identity, a list of components identified by their names, a list of performances identified by their names. On following lines (a line by assemblage), name of the assemblage (read as character), a sequence of 0 (absence) and 1 (presence of component within each assemblage) (this is the matrix of occurrence of components within the system), a sequence of numeric values for informed each observed performances (this is the set of observed performances).

nbElt

an integer, that specifies the number of components belonging to interactive system. nbElt is used to know the dimension of matrix of occurrence.

weight

a vector of numerics, that specifies the weight of each performance. By default, each performance is equally weighted. If weight is informed, it must have the same length as the number of observed performances.

opt.na

a logical. The records for each assemblage can have NA in matrix of occurrence or in observed assemblage performances. If opt.na = FALSE (by default), an error is returned. If opt.na = TRUE, the records with NA are ignored.

opt.repeat

a logical. in any case, the function looks for different assemblages with identical elemental composition. Messages indicate these identical assemblages. If opt.repeat = FALSE (by default), their performances are averaged. If opt.repeat = TRUE, nothing is done, and the data are processed as they are.

opt.mean

a character, equals to "amean" or "gmean". If opt.mean = "amean", means are computed using an arithmetic formula, if opt.mean = "gmean", mean are computed using a geometric formula.

Details

None.

Value

Return a list containing formatted inputs, that are:


functClust documentation built on Dec. 2, 2020, 5:06 p.m.