boot_ordination: Boostrap ordination.

Description Usage Arguments Value Examples

View source: R/bootstrap.R

Description

boot_ordination computes the ordination for samples boostrapped from data in D. Ordination is performed using mvarVis::ordi function with specified method.

Usage

1
2
3
4
boot_ordination(D, n = 50, method = "pco", dist_method = "euclidean",
  taxa_are_rows = TRUE, rows_annot = NULL, cols_annot = NULL,
  table_names = NULL, common_depth = FALSE, common_value = NULL,
  replace_zero = FALSE, replace_value = 1, round_values = FALSE, ...)

Arguments

D

(Required). A data frame of raw counts/weights. Raw data is required, and distance matrix/objects are not acceptable.

n

(Optional). Default 50. An integer indicating the number of boostrap samples generated.

method

(Required). The method that will perform the required ordination. See ordi()for options.

dist_method

(Optional). If a distance matrix is used by the specified method. We will call vegdist on the D using this string as the distance. Defaults to euclidean distance.

taxa_are_rows

(Optional) Default TRUE. Whether rows of D are taxa/features.

common_depth

(Optional). Default FALSE. The value to which to normalize the boostrapped column sums. If not provided, do not normalize to a common depth.

common_value

(Optional) The depth to use when common_depth is TRUE. Defaults to the median of the column sums in tab.

replace_zero

(Optional) A logical specifying whether to replace zeros in x.

replace_value

(Optional) The value to replace zeros with, when replace_zero is TRUE; i.e. we add a small positive weight. Default value is 1.

round_values

(Optional). Default FALSE. A logical scalar. Should the boostrap counts be rounded to the nearest integer?

Value

A list ordination objects generated by calling mvarVis::ordi on each of the boostrap samples, and then rotating the coordinates using procustes method to fit them to the coordinates of ordination of the original data table.

Examples

1
2
3
D <-  matrix(runif(100, max = 100), nrow = 25)
bootOrd <- boot_ordination(D, n = 50, method = "ade4_pca",
                           dist_method = "euclidean", scannf = F, nf = 2)

krisrs1128/mvarVis documentation built on Oct. 13, 2019, 11:14 p.m.