Calculate pairwise site PCD, users can specify expected values from pcd_pred()
.
pcd(comm, tree, expectation = NULL, cpp = TRUE, verbose = TRUE, ...)
A site by species data frame or matrix, sites as rows.
A phylogeny for species.
nsp_pool, psv_bar, psv_pool, and nsr calculated from pcd_pred()
.
Whether to use loops written with c++, default is TRUE.
Do you want to see the progress?
Other arguments.
A list of a variety of pairwise dissimilarities.
Ives, A. R., & Helmus, M. R. 2010. Phylogenetic metrics of community similarity. The American Naturalist, 176(5), E128-E142.
x1 = pcd_pred(comm_1 = comm_a, comm_2 = comm_b, tree = phylotree, reps = 100)
pcd(comm = comm_a, tree = phylotree, expectation = x1)
#> Dropping tips from the phylogeny that are not in the community data
#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14
#> $PCD
#> s3293 s3294 s3295 s3296 s3297 s3299 s3300
#> s3294 0.9914498
#> s3295 1.1773801 0.6957718
#> s3296 1.1456428 1.2441932 1.2122653
#> s3297 1.1505331 1.1179064 1.0611970 0.6542952
#> s3299 1.0079386 0.3426256 0.7157240 1.3480293 1.3381634
#> s3300 1.1826385 0.5688566 0.5055120 1.2780239 0.7839039 0.4876850
#> s3301 0.7419797 0.9827214 1.2802992 1.2144384 1.2212061 0.9950126 1.2869482
#> s3302 0.8958499 0.3640568 1.0043420 1.0268708 0.9963748 0.5244008 0.8213843
#> s3303 0.6890059 0.7362887 1.0731689 0.8520680 0.8118777 0.8989952 1.1260784
#> s3304 0.8869721 0.8852481 1.1905544 0.6222910 0.5532135 1.0354350 1.2455428
#> s3307 0.9853509 0.3479137 0.6539996 1.3094212 1.3181506 0.3738912 0.8035053
#> s3308 0.9766321 0.6231809 1.2350369 0.7860544 0.6058010 0.9563741 1.1048792
#> s3309 1.1751110 0.7795877 0.7671568 1.2557815 1.2447693 0.3960938 0.5222787
#> s3311 1.1790345 0.6614418 0.6510374 1.0849574 0.5983012 0.9443513 0.4624953
#> s3301 s3302 s3303 s3304 s3307 s3308 s3309
#> s3294
#> s3295
#> s3296
#> s3297
#> s3299
#> s3300
#> s3301
#> s3302 0.8821916
#> s3303 0.7255851 0.4162472
#> s3304 0.8568354 0.6077658 0.2797730
#> s3307 0.9851791 0.5256481 0.8858628 1.0179214
#> s3308 0.9675872 0.4716632 0.5002946 0.2747528 0.9440812
#> s3309 1.2444437 0.6549595 1.1880307 1.2662417 0.7796731 1.1015416
#> s3311 1.2777424 0.8133230 0.9134640 1.0247722 0.9313338 1.1023531 1.0588116
#>
#> $PCDc
#> s3293 s3294 s3295 s3296 s3297 s3299 s3300
#> s3294 0.7346939
#> s3295 1.1052632 0.6521739
#> s3296 1.0975610 1.3278689 1.3636364
#> s3297 1.0975610 1.3278689 1.0909091 0.6428571
#> s3299 0.7346939 0.2769231 0.6521739 1.3278689 1.3278689
#> s3300 1.1052632 0.6521739 0.5000000 1.3636364 0.8181818 0.3913043
#> s3301 0.3600000 0.8490566 1.2000000 1.1739130 1.1739130 0.8490566 1.2000000
#> s3302 0.6585366 0.4426230 1.0909091 0.9642857 0.9642857 0.4426230 0.8181818
#> s3303 0.3600000 0.8490566 1.2000000 0.7826087 0.7826087 0.8490566 1.2000000
#> s3304 0.5454545 0.9473684 1.2857143 0.5294118 0.5294118 0.9473684 1.2857143
#> s3307 0.7346939 0.2769231 0.6521739 1.3278689 1.3278689 0.2769231 0.6521739
#> s3308 0.7346939 0.5538462 1.1739130 0.7377049 0.7377049 0.8307692 1.1739130
#> s3309 1.0909091 0.6315789 0.7142857 1.2352941 1.2352941 0.3157895 0.4285714
#> s3311 1.1020408 0.8307692 0.6521739 1.0327869 0.7377049 0.8307692 0.6521739
#> s3301 s3302 s3303 s3304 s3307 s3308 s3309
#> s3294
#> s3295
#> s3296
#> s3297
#> s3299
#> s3300
#> s3301
#> s3302 0.7826087
#> s3303 0.5625000 0.3913043
#> s3304 0.6923077 0.5294118 0.2307692
#> s3307 0.8490566 0.4426230 0.8490566 0.9473684
#> s3308 0.8490566 0.4426230 0.5094340 0.3157895 0.8307692
#> s3309 1.1538462 0.5294118 1.1538462 1.2000000 0.6315789 0.9473684
#> s3311 1.1886792 0.7377049 0.8490566 0.9473684 0.8307692 1.1076923 0.9473684
#>
#> $PCDp
#> s3293 s3294 s3295 s3296 s3297 s3299 s3300
#> s3294 1.3494733
#> s3295 1.0652487 1.0668501
#> s3296 1.0438079 0.9369850 0.8889946
#> s3297 1.0482635 0.8418801 0.9727639 1.0177925
#> s3299 1.3719164 1.2372590 1.0974434 1.0151825 1.0077526
#> s3300 1.0700063 0.8722468 1.0110239 0.9372175 0.9581047 1.2463062
#> s3301 2.0610548 1.1574274 1.0669160 1.0345216 1.0402867 1.1719038 1.0724568
#> s3302 1.3603647 0.8224987 0.9206468 1.0649031 1.0332776 1.1847573 1.0039142
#> s3303 1.9139053 0.8671844 0.8943074 1.0887536 1.0373992 1.0588166 0.9383987
#> s3304 1.6261155 0.9344286 0.9259868 1.1754386 1.0449589 1.0929592 0.9687555
#> s3307 1.3411721 1.2563549 1.0027994 0.9861074 0.9926813 1.3501627 1.2320415
#> s3308 1.3293048 1.1251877 1.0520685 1.0655404 0.8211969 1.1511911 0.9411934
#> s3309 1.0771851 1.2343473 1.0740195 1.0165850 1.0076704 1.2542969 1.2186502
#> s3311 1.0698647 0.7961799 0.9982574 1.0505143 0.8110305 1.1367192 0.7091595
#> s3301 s3302 s3303 s3304 s3307 s3308 s3309
#> s3294
#> s3295
#> s3296
#> s3297
#> s3299
#> s3300
#> s3301
#> s3302 1.1272448
#> s3303 1.2899290 1.0637429
#> s3304 1.2376511 1.1480021 1.2123497
#> s3307 1.1603220 1.1875754 1.0433495 1.0744726
#> s3308 1.1396028 1.0656095 0.9820598 0.8700505 1.1363941
#> s3309 1.0785179 1.2371458 1.0296266 1.0552014 1.2344824 1.1627384
#> s3311 1.0749261 1.1025046 1.0758576 1.0817040 1.1210500 0.9951799 1.1176345
#>
#> $D_pairwise
#> s3293 s3294 s3295 s3296 s3297 s3299 s3300
#> s3294 0.8306670
#> s3295 0.9857201 0.4186715
#> s3296 0.9798550 0.8653963 0.8273000
#> s3297 0.9840376 0.7775577 0.7242047 0.4929596
#> s3299 0.8444818 0.2135267 0.4306774 0.9376193 0.9307570
#> s3300 0.9901225 0.3423020 0.2911608 0.8721764 0.5349684 0.2934580
#> s3301 0.6416168 0.7594899 0.9839312 0.9791681 0.9846247 0.7689891 0.9890411
#> s3302 0.7662101 0.2532190 0.6854045 0.7736659 0.7506895 0.3647460 0.5605466
#> s3303 0.5958084 0.5690360 0.8247482 0.6869989 0.6545945 0.6947827 0.8654100
#> s3304 0.7538969 0.6260509 0.8298862 0.4703337 0.4181243 0.7322636 0.8682163
#> s3307 0.8255572 0.2168223 0.3935356 0.9107655 0.9168372 0.2330117 0.4834987
#> s3308 0.8182523 0.3883709 0.7431671 0.5467387 0.4213638 0.5960193 0.6648464
#> s3309 0.9988055 0.5513274 0.5347532 0.9491321 0.9408090 0.2801190 0.3640588
#> s3311 0.9878312 0.4122153 0.3917532 0.7546401 0.4161473 0.5885266 0.2783005
#> s3301 s3302 s3303 s3304 s3307 s3308 s3309
#> s3294
#> s3295
#> s3296
#> s3297
#> s3299
#> s3300
#> s3301
#> s3302 0.7112867
#> s3303 0.6041933 0.3356086
#> s3304 0.6877471 0.4593554 0.2245625
#> s3307 0.7613893 0.3656136 0.6846334 0.7198779
#> s3308 0.7477936 0.3280645 0.3866495 0.1943062 0.5883583
#> s3309 0.9988646 0.4950249 0.9535842 0.9593070 0.5513878 0.7790144
#> s3311 0.9874950 0.5657053 0.7059648 0.7247228 0.5804140 0.6869945 0.7487957
#>
#> $dsor_pairwise
#> s3293 s3294 s3295 s3296 s3297 s3299 s3300
#> s3294 0.6666667
#> s3295 1.0000000 0.4545455
#> s3296 1.0000000 1.0000000 1.0000000
#> s3297 1.0000000 1.0000000 0.8000000 0.5000000
#> s3299 0.6666667 0.2000000 0.4545455 1.0000000 1.0000000
#> s3300 1.0000000 0.4545455 0.3333333 1.0000000 0.6000000 0.2727273
#> s3301 0.3333333 0.7142857 1.0000000 1.0000000 1.0000000 0.7142857 1.0000000
#> s3302 0.6000000 0.3333333 0.8000000 0.7500000 0.7500000 0.3333333 0.6000000
#> s3303 0.3333333 0.7142857 1.0000000 0.6666667 0.6666667 0.7142857 1.0000000
#> s3304 0.5000000 0.7500000 1.0000000 0.4285714 0.4285714 0.7500000 1.0000000
#> s3307 0.6666667 0.2000000 0.4545455 1.0000000 1.0000000 0.2000000 0.4545455
#> s3308 0.6666667 0.4000000 0.8181818 0.5555556 0.5555556 0.6000000 0.8181818
#> s3309 1.0000000 0.5000000 0.5555556 1.0000000 1.0000000 0.2500000 0.3333333
#> s3311 1.0000000 0.6000000 0.4545455 0.7777778 0.5555556 0.6000000 0.4545455
#> s3301 s3302 s3303 s3304 s3307 s3308 s3309
#> s3294
#> s3295
#> s3296
#> s3297
#> s3299
#> s3300
#> s3301
#> s3302 0.6666667
#> s3303 0.5000000 0.3333333
#> s3304 0.6000000 0.4285714 0.2000000
#> s3307 0.7142857 0.3333333 0.7142857 0.7500000
#> s3308 0.7142857 0.3333333 0.4285714 0.2500000 0.6000000
#> s3309 1.0000000 0.4285714 1.0000000 1.0000000 0.5000000 0.7500000
#> s3311 1.0000000 0.5555556 0.7142857 0.7500000 0.6000000 0.8000000 0.7500000
#>