数据说明:哺乳动物的体重和长骨形态有关。本数据收集了10种犀总科(Rhinocerotoidea)动物的学名、体重(kg)、长骨的苗条系数(宽度/长度)、长骨的标本数,并制图以供浏览。数据出处:Long bone shape variation in the forelimb of Rhinocerotoidea: relation with size, body mass and body proportions,https://doi.org/10.1093/zoolinnean/zlab095

taxons <- c("Acerorhinus zernowi","Alicornops simorrense","Amynodon advenus","Aphelops malacorhinus","Aphelops mutilus","Brachypotherium brachypus","Cadurcodon ardynensis","Ceratotherium neumayri","Ceratotherium simum","Chilotherium persiae")
numbers <- c(1,2,3,4,5,6,7,8,9,10)
bodymass <- c(700,875,589,889,1840,2327,837,1844,2300,700)
gracilityindex <- c(0.27,0.27,0.20,0.23,0.32,0.30,0.17,0.33,0.33,0.31)
digitnumber <- c(4,4,4,4,4,3,4,3,3,4)

info <- data.frame(物种=taxons,序号=numbers,体重=bodymass,长骨苗条系数=gracilityindex,标本数=digitnumber)
head(info,10)
##                         物种 序号 体重 长骨苗条系数 标本数
## 1        Acerorhinus zernowi    1  700         0.27      4
## 2      Alicornops simorrense    2  875         0.27      4
## 3           Amynodon advenus    3  589         0.20      4
## 4      Aphelops malacorhinus    4  889         0.23      4
## 5           Aphelops mutilus    5 1840         0.32      4
## 6  Brachypotherium brachypus    6 2327         0.30      3
## 7      Cadurcodon ardynensis    7  837         0.17      4
## 8     Ceratotherium neumayri    8 1844         0.33      3
## 9        Ceratotherium simum    9 2300         0.33      3
## 10      Chilotherium persiae   10  700         0.31      4

计算统计量

mean(info$体重)
## [1] 1290.1
sd(info$体重)
## [1] 701.6426
var(info$体重)
## [1] 492302.3
quantile(info$体重)
##      0%     25%     50%     75%    100% 
##  589.00  734.25  882.00 1843.00 2327.00

这十个犀总科物种的体重平均值为1290.1kg,标准差为701.6426,方差为492302.3,四分位数分别为589.00,734.25,882.00,1843.00,2327.00。鉴于这十个物种属于不同的演化支,生活在不同的时代,彼此之间体型差距很大也是正常的。

数据可视化

条形图

barplot(info$体重,
        names.arg=info$序号,
        col=c("#66ccff","#00FFCC","#EE0000","#006666","#ffff00"),
        ylab="体重(kg)")

barplot(info$长骨苗条系数,
        names.arg=info$序号,
        col=c("#66ccff","#00FFCC"),
        ylab="长骨苗条系数")

直方图

hist(info$体重,xlab = "体重(kg)",col=c("#00FFCC","#006666","#66ccff","#EE0000","#ffff00"),main="所选十种犀总科动物体重频数分布图")

hist(info$长骨苗条系数,xlab = "长骨苗条系数",col=c("#00FFCC","#006666","#66ccff","#EE0000","#ffff00"),main="所选十种犀总科动物长骨苗条系数频数分布图")

箱线图

boxplot(info$体重,col = "#66ccff",xlab="体重(kg)")

boxplot(info$长骨苗条系数,col = "#00FFCC",xlab="长骨苗条系数")