ypma.diss: Calculate Ypma dissimilarities for type, time, and unit

Description Usage Arguments Value

View source: R/ypma_diss.r

Description

This function takes a data.frame of one species (or other sensible taxonomic unit) containing information on time, unit, and type to calculate Ypma dissimilarities between entries.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ypma.diss(
  d,
  e = NULL,
  tc,
  uc,
  ic,
  dfun = c("dist", "daisy"),
  dfun.args = list(method = "manhattan"),
  p = F,
  p.n = 3,
  n.cores = parallel::detectCores()
)

Arguments

d

A data.frame containing columns for id, time, unit (e.g. ward) and type (represented by remaining columns).

e

A quadratic matrix with identical row and column names representing effective distances of units contained in d.

tc

A character or numeric identifying name or number, respectively, of id column in d.

uc

A character or numeric identifying name or number, respectively, of unit column in d.

dfun

A character specifying name of function for distance (dissimilarity) calculation of type columns.

dfun.args

A list specifying arguments passed to dfun.

p

A logical specifying if permutation is to be performed. Defaults to FALSE.

p.n

An integer specifying number of permutations performed if p is TRUE.

n.cores

An integer specifying the number of cores used for permutations. Defaults to maximum number of cores (as per parallel::detectCores()).

Value

If p is FALSE (default) a square matrix containing Ypma dissimilarities between rows in d (represented by id), and a list with Ypma dissimilarity matrices of random permutations of d otherwise.


joheli/yea13 documentation built on Sept. 18, 2020, 11:21 p.m.