我正在尝试为相同定量变量的多个类内系数制作分组条形图,在不同因素(“constructeur”、“coup”...“pitch”)的标准化前后估计。这是我的数据集的前 5 行:
ICC_intra_observ_3D <- read.csv2("~/Documents/ICC_intra_observ_3D_av_ap_H.csv")
ICC_intra_observ_3D[c(1:5),]
Texture_Feature ICC_intra_observ_3D_av_H ICC_ap_H_constructeur ICC_ap_H_coup ICC_ap_H_detect ICC_ap_H_filter ICC_ap_H_kv ICC_ap_H_mAs ICC_ap_H_pitch
1 CONVENTIONAL_HUmin 11.18 22.26 11.3 13.86 22.94 11.74 18.84 14.26
2 CONVENTIONAL_HUmean 91.16 91.06 91.05 92.09 89.33 90.79 88.2 92.26
3 CONVENTIONAL_HUstd 60.16 62.09 60.34 62.26 63.64 60.22 61.94 59.96
4 CONVENTIONAL_HUmax 76.36 77.09 76.41 80.12 74.75 75.74 73.37 77.21
5 CONVENTIONAL_HUQ1 88.81 88.86 88.7 90.04 87.29 88.46 86.17 90.62
这是一些转换,以便 barplot 函数可以使用方便的矩阵
rownames(ICC_intra_observ_3D)=ICC_intra_observ_3D$Texture_Feature
ICC_intra_observ_3D=ICC_intra_observ_3D[,-1]
ICC_intra_observ_3D=t(ICC_intra_observ_3D)
之后的结果是:
CONVENTIONAL_HUmin CONVENTIONAL_HUmean CONVENTIONAL_HUstd CONVENTIONAL_HUmax CONVENTIONAL_HUQ1 CONVENTIONAL_HUQ2 CONVENTIONAL_HUQ3
ICC_intra_observ_3D_av_H "11.18" "91.16" "60.16" "76.36" "88.81" "89.91" "91.1"
ICC_ap_H_constructeur "22.26" "91.06" "62.09" "77.09" "88.86" "89.89" "91.04"
ICC_ap_H_coup "11.3" "91.05" "60.34" "76.41" "88.7" "89.84" "91.1"
ICC_ap_H_detect "13.86" "92.09" "62.26" "80.12" "90.04" "90.96" "91.47"
ICC_ap_H_filter "22.94" "89.33" "63.64" "74.75" "87.29" "88.12" "89.07"
ICC_ap_H_kv "11.74" "90.79" "60.22" "75.74" "88.46" "89.62" "90.79"
ICC_ap_H_mAs "18.84" "88.2" "61.94" "73.37" "86.17" "87.03" "87.92"
ICC_ap_H_pitch "14.26" "92.26" "59.96" "77.21" "90.62" "91.26" "91.88"
但是运行时:
barplot(ICC_intra_observ_3D,beside=T)
错误消息:-0.01 * height 中的错误:二元运算符的非数字参数
知道使用默认参数beside = F
我有一个堆叠的条形图似乎可以正常运行,但我需要比较不同的 ICC,所以将它们放在旁边更合适。
请注意,我没有尝试过,ggplot()
因为重组我的输入数据集似乎更加困难,但欢迎提出任何建议。
谢谢你的帮助