r - 计算姐妹物种之间的性状差异
问题描述
我有系统发育和 3-D 形态测量数据。我想计算姐妹分类群 PC 分数之间的特征差异。R 或 R 脚本中是否有可以执行此操作的函数?
解决方案
您确实可以将评论中建议的dispRity包与geomorph包结合使用。
R
一旦您的 3D 数据通过正确读取,geomorph
您就可以使用这个简单的管道:
## 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
当然,我强烈建议您在每个步骤中必须做出的影响和决定(每个步骤的详细信息可以在功能手册中找到)。
推荐阅读
- flutter - ElevatedButton 的背景没有被修改
- raspberry-pi - 在运行 Yocto 映像的 RaspberryPi 4 上获取 IP 地址
- javascript - 如何在javascript中将2个对象组合为一个?
- oracle - 似乎无法弄清楚如何执行存储过程
- android - Android 通过 Intent Uri 检索图像失败:“无法访问内容......”
- amazon-web-services - Docker 服务自动停止
- algorithm - 在不使用第三个温度的情况下交换 2 个数字
- react-native - react-native如何获取视频的数据
- c++ - c++调用模板类特化成员函数
- python - 评估 json 文件 | 蟒蛇爬虫