procrutes_test: Procrutes test for dissimilarity matrices

Description Usage Arguments Value Author(s) Examples

View source: R/procrutes-test.R

Description

Perform procrutes test quickly and tidy up the data to data frame.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
procrutes_test(
  spec,
  env,
  group = NULL,
  procrutes.fun = "protest",
  spec.select = NULL,
  env.select = NULL,
  use = "everything",
  spec.pre.fun = "identity",
  spec.pre.params = list(),
  env.pre.fun = spec.pre.fun,
  env.pre.params = spec.pre.params,
  seed = 123,
  ...
)

Arguments

...

extra params passing to procrutes.fun.

spec, env

data frame object.

group

vector for rows grouping.

procrutes.fun

string, name of procrutes test function.

  • "protest" will use vegan::protest() (default).

  • "procuste.randtest" will use ade4::procuste.randtest().

  • "procuste.rtest" will use ade4::procuste.rtest().

spec.select, env.select

NULL (default), numeric or character vector index of columns.

use

one of "everything", "complete" or "pairwise".

spec.pre.fun, env.pre.fun

string, function name of transform the input data.

spec.pre.params, env.pre.params

list, extra parameters for spec/env.pre.fun.

seed

a integer value.

Value

a data frame.

Author(s)

Houyun Huang, Lei Zhou, Jian Chen, Taiyun Wei

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
library(vegan)
data("varespec")
data("varechem")
procrutes_test(varespec, varechem)
procrutes_test(varespec, varechem, procrutes.fun = "procuste.randtest")
procrutes_test(varespec, varechem,
            spec.select = list(spec01 = 1:6, spec02 = 7:12))
procrutes_test(varespec, varechem, spec.pre.fun = "mono_mds",
            spec.select = list(spec01 = 1:6, spec02 = 7:12),
            env.select = list(env01 = 1:4, env02 = 5:14))
set.seed(20191224)
sam_grp <- sample(paste0("sample", 1:3), 24, replace = TRUE)
procrutes_test(varespec, varechem, group = sam_grp)

## End(Not run)

houyunhuang/ggcor documentation built on July 22, 2020, 8:31 p.m.