ggtqplotPD: Plots time-profile and q-profile based on the outcome of...

Description Usage Arguments Value Examples

Description

Function ggtqplotPD plots time-profile (depicting phylogenetic diversity as a function of time) and q-profile (depicting phylogenetic diversity as a function of order q) based on the outcome of the functions PhdObs or PhdAsy using the ggplot2 package.

Usage

1
ggtqplotPD(outcome, profile = "q")

Arguments

outcome

the outcome of the functions PhdObs or PhdAsy.

profile

specifying the type of profile: profile = "q" for order q profile and profile = "time" for time profile. Default is "q".

Value

plot of the PD or meanPD empirical or estimated asymptotic curves using the ggplot2 package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Observed q-profile plot for abundance data
data(data.abu)
data <- data.abu$data
tree <- data.abu$tree
out <- PhdObs(data = data, datatype = "abundance", tree = tree, q = seq(0, 2, by = 0.25))
ggtqplotPD(out, profile = "q")

# Observed time-profile plot for abundance data
data(data.abu)
data <- data.abu$data
tree <- data.abu$tree
out <- PhdObs(data = data, datatype = "abundance", tree = tree, q = c(0, 1, 2),
reftime = seq(0.1, 325, length.out = 40))
ggtqplotPD(out, profile = "time")

# Asymptotic q-profile plot for incidence_raw data
data(data.inc)
data <- data.inc$data
tree <- data.inc$tree
nT <- data.inc$nT
out <- PhdAsy(data = data, datatype = "incidence_raw", nT = nT, tree = tree,
q = seq(0, 2, by = 0.25))
ggtqplotPD(out, profile = "q")

# Asymptotic time-profile plot for incidence_raw data
data(data.inc)
data <- data.inc$data
tree <- data.inc$tree
nT <- data.inc$nT
out <- PhdAsy(data = data, datatype = "incidence_raw", nT = nT, tree = tree,
q = c(0, 1, 2), reftime = seq(0.1, 82.8575, length.out = 40))
ggtqplotPD(out, profile = "time")

YanHanChen/iNEXTPD2 documentation built on Aug. 24, 2020, 4:15 a.m.