pcd2: pairwise site phylogenetic community dissimilarity (PCD)...

Description Usage Arguments Value Examples

View source: R/pd.R

Description

Calculate pairwise site PCD, users can specify expected values from pcd_pred().

Usage

1
2
pcd2(comm, tree, expectation = NULL, cpp = TRUE, unif_dim = 1000,
  verbose = TRUE)

Arguments

comm

site by species data frame or matrix, sites as rows.

tree

a phylogeny for species

expectation

nsp_pool, psv_bar, psv_pool, and nsr calculated from pcd_pred().

cpp

whether to use loops written with c++, default is TRUE

unif_dim

the number of cells (nrow * ncol) of the comm, if it is less than unif_dim, then calculate unifrac and phylosor; these functions are very slow.

verbose

do you want to see the progress?

Value

a list of a variety of pairwise dissimilarities.

Examples

1
2
3
4
5
6
x1 = pcd_pred(comm_old = read.csv('data/li_2015_old.csv', row.names = 1, check.names = F),
              comm_new = read.csv('data/li_2015_new.csv', row.names = 1, check.names = F),
                 tree = ape::read.tree('data/phy.tre'), reps = 100)
pcd2(comm = read.csv('data/li_2015_old.csv', row.names = 1, check.names = F),
      tree = ape::read.tree('data/phy.tre'), 
      expectation = x1)

daijiang/dli55 documentation built on Jan. 28, 2018, 3:48 a.m.