prepare_paco_data: Prepares the data (distance matrices and association matrix)...

Description Usage Arguments Value Examples

View source: R/prepare_data.r

Description

Simple wrapper to make sure that the matrices are sorted accordingly and to group them together into a paco object (effectively a list) that is then passed to the remaining steps of PACo analysis.

Usage

1

Arguments

H

Host distance matrix. This is the distance matrix upon which the other will be superimposed. We term this the host matrix in reference to the original cophylogeny studies between parasites and their hosts, where parasite evolution was thought to track host evolution hence why the parasite matrix is superimposed on the host.

P

Parasite distance matrix. The distance matrix that will be superimposed on the host matrix. As mentioned above, this is the group that is assumed to track the evolution of the other.

HP

Host-parasite association matrix, hosts in rows. This should be a binary matrix. If host species aren't in the rows, the matrix will be translated internally.

Value

A list with objects H, P, HP to be passed to further functions for PACo analysis.

Examples

1
2
3
4
5
data(gopherlice)
library(ape)
gdist <- cophenetic(gophertree)
ldist <- cophenetic(licetree)
D <- prepare_paco_data(gdist, ldist, gl_links)

Example output



paco documentation built on Aug. 26, 2020, 1:06 a.m.