我有一个系谱和三维形态数据。我想要计算姐妹类群PC得分之间的性状差异。在R或R脚本中有没有函数可以做到这一点?
发布于 2018-09-21 14:01:21
您确实可以按照注释中的建议将dispRity包与geomorph包结合使用。
一旦您的3D数据通过geomorph正确读取到R中,您就可以使用这个简单的管道:
## Make sure the packages are installed
library(dispRity)
library(geomorph)
## Some example 2D dataset
data(plethodon)
## Performing some GPA
procrustes <- gpagen(plethodon$land, PrinAxes=FALSE)
## Creating a geomorph dataframe
geomorphDF <- geomorph.data.frame(procrustes, species = plethodon$species)
## Creating a dispRity object and performing and ordination
ordination <- geomorph.ordination(geomorphDF)
## Measuring disparity as the sum of variances
disparity <- dispRity(ordination, metric = c(sum, variances))
summary(disparity)
# subsets n obs
# 1 species.Jord 20 0.004
# 2 species.Teyah 20 0.004当然,我强烈建议您在每个步骤中做出的含义和决定(每个步骤的详细信息可以在功能手册中找到)。
https://stackoverflow.com/questions/52358590
复制相似问题