procmod_frame: The procmod_frame data structure.

Description Usage Arguments Value Author(s) Examples

View source: R/procmod_frame.R

Description

A procmod_frame can be considered as the analog of a data.frame for vector data. In a procmod_frame each element, equivalent to a column in a data.frame is a numeric matrix or a distance matrix object (dist). Every element must describe the same number of individuals. Therefore every numeric matrix must have the same number of row (nrow) and every distance matrix must have the same size (attr(d,"Size")). A procmod_frame can simultaneously contain both types of data, numeric and distance matrix.

Usage

1
2
3
4
5
6
7
procmod_frame(
  ...,
  row_names = NULL,
  check_rows = TRUE,
  reorder_rows = TRUE,
  contrasts_arg = NULL
)

Arguments

...

a set of objects to aggregate into a procmod_frame. These objects can be numeric matrices, or dist objects. Every objects must have the same number of row.

row_names

a character vector containing names associated to each row.

check_rows

a logical value. When set to TRUE, its default value, the number of row of every elements of the procmod_frame are tested for equality. Otherwise no check is done.

reorder_rows

a logical value. When set to TRUE, its default value, every elements of the procmod_frame are reordered according to the row_names order. Otherwise nothing is done.

contrasts_arg

A list, whose entries are values (numeric matrices or character strings naming functions) to be used as replacement values for the contrasts replacement function and whose names are the names of columns of data containing factors.

Value

a procmod_frame instance.

Author(s)

Eric Coissac

Christelle Gonindard-Melodelima

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(vegan)
data(bacteria)
data(eukaryotes)
data(soil)

dataset <- procmod_frame(euk = vegdist(decostand(eukaryotes,
                                                 method = "hellinger"),
                                       method = "euclidean"),
                         bac = vegdist(decostand(bacteria,
                                                 method = "hellinger"),
                                       method = "euclidean"),
                         soil = scale(soil,
                                      center = TRUE,
                                      scale  = TRUE))
length(dataset)
nrow(dataset)
ncol(dataset)
dataset$euk

ProcMod documentation built on May 12, 2021, 9:08 a.m.