Skip to contents

Given the results of cpr_rand_test(), classifies phylogenetic endemism according to CANAPE scheme of Mishler et al. 2014.

Usage

cpr_classify_endem(df)

Arguments

df

Input data frame. Must have the following columns:

  • pe_obs_p_upper: Upper p-value comparing observed phylogenetic endemism to random values

  • pe_alt_obs_p_upper: Upper p-value comparing observed phylogenetic endemism on alternate tree to random values

  • rpe_obs_p_upper: Upper p-value comparing observed relative phylogenetic endemism to random values

Value

Object of class data.frame with column endem_type (character) added. Values of endem_type type include paleo (paleoendemic), neo

(neoendemic), not significant (what it says), mixed (mixed endemism), and super (super-endemic; both pe_obs and pe_obs_alt are highly significant).

Details

For a summary of the classification scheme, see: http://biodiverse-analysis-software.blogspot.com/2014/11/canape-categorical-analysis-of-palaeo.html # nolint

References

Mishler, B., Knerr, N., González-Orozco, C. et al. (2014) Phylogenetic measures of biodiversity and neo- and paleo-endemism in Australian Acacia. Nat Commun, 5: 4473. doi:10.1038/ncomms5473

Examples

# \donttest{
set.seed(12345)
data(phylocom)
rand_test <- cpr_rand_test(
  phylocom$comm, phylocom$phy,
  null_model = "curveball", metrics = c("pe", "rpe"), n_reps = 10
)
#> Warning: Dropping tips from the tree because they are not present in the community data: 
#>  sp16, sp23, sp27, sp28, sp30, sp31, sp32
cpr_classify_endem(rand_test)
#>            pe_obs pe_rand_mean pe_rand_sd   pe_obs_z pe_obs_c_upper
#> clump1  0.1333333    0.1601258 0.02255633 -1.1878021              2
#> clump2a 0.1081761    0.1688994 0.04045672 -1.5009439              0
#> clump2b 0.1286164    0.1900000 0.03566647 -1.7210463              0
#> clump4  0.1411950    0.1615723 0.02114950 -0.9634914              1
#> even    0.2506289    0.1510377 0.02603384  3.8254515             10
#> random  0.2380503    0.1683648 0.01843148  3.7807896             10
#>         pe_obs_c_lower pe_obs_q pe_obs_p_upper pe_obs_p_lower pe_alt_obs
#> clump1               8       10            0.2            0.8  0.1472222
#> clump2a             10       10            0.0            1.0  0.1194444
#> clump2b             10       10            0.0            1.0  0.1420139
#> clump4               9       10            0.1            0.9  0.1454861
#> even                 0       10            1.0            0.0  0.2246528
#> random               0       10            1.0            0.0  0.2211806
#>         pe_alt_rand_mean pe_alt_rand_sd pe_alt_obs_z pe_alt_obs_c_upper
#> clump1         0.1670833     0.02267384   -0.8759481                  2
#> clump2a        0.1653125     0.02746616   -1.6699844                  0
#> clump2b        0.1792361     0.02587721   -1.4384173                  1
#> clump4         0.1586111     0.02151396   -0.6100690                  3
#> even           0.1570486     0.02442434    2.7679014                 10
#> random         0.1727083     0.01740057    2.7856683                 10
#>         pe_alt_obs_c_lower pe_alt_obs_q pe_alt_obs_p_upper pe_alt_obs_p_lower
#> clump1                   8           10                0.2                0.8
#> clump2a                 10           10                0.0                1.0
#> clump2b                  9           10                0.1                0.9
#> clump4                   7           10                0.3                0.7
#> even                     0           10                1.0                0.0
#> random                   0           10                1.0                0.0
#>           rpe_obs rpe_rand_mean rpe_rand_sd  rpe_obs_z rpe_obs_c_upper
#> clump1  0.9056604     0.9598600  0.06934401 -0.7816056               1
#> clump2a 0.9056604     1.0132992  0.09391889 -1.1460825               1
#> clump2b 0.9056604     1.0583389  0.12560225 -1.2155712               0
#> clump4  0.9705048     1.0264621  0.13618459 -0.4108930               5
#> even    1.1156280     0.9609335  0.05648158  2.7388486              10
#> random  1.0762714     0.9778947  0.09352148  1.0519157               9
#>         rpe_obs_c_lower rpe_obs_q rpe_obs_p_upper rpe_obs_p_lower
#> clump1                7        10             0.1             0.7
#> clump2a               9        10             0.1             0.9
#> clump2b              10        10             0.0             1.0
#> clump4                5        10             0.5             0.5
#> even                  0        10             1.0             0.0
#> random                1        10             0.9             0.1
#>              endem_type
#> clump1  not significant
#> clump2a not significant
#> clump2b not significant
#> clump4  not significant
#> even              paleo
#> random            super
# }