我试图使用ggpairs来可视化我的数据集,但我得到的错误消息是我不理解的。有人能帮帮我吗?
> describe(Mydata)
vars n mean sd median trimmed mad min max range skew
Time 1 192008 4257.07 2589.28 4156.44 4210.33 3507.03 0 8869.91 8869.91 0.09
Source* 2 192008 9.32 5.95 8.00 8.53 2.97 1 51.00 50.00 3.39
Destination* 3 192008 8.22 6.49 7.00 7.31 2.97 1 51.00 50.00 3.07
Protocol* 4 192008 16.14 4.29 19.00 16.77 0.00 1 20.00 19.00 -1.26
Length 5 192008 166.12 464.07 74.00 96.25 11.86 60 21786.00 21726.00 14.40
Info* 6 192008 63731.70 46463.90 60732.50 62899.62 69904.59 1 131625.00 131624.00 0.14
kurtosis se
Time -1.28 5.91
Source* 15.94 0.01
Destination* 13.21 0.01
Protocol* 0.66 0.01
Length 349.17 1.06
Info* -1.47 106.04
> Mydata[,1][Mydata[,1] ==0]<-NA
> ggpairs(Mydata)
Error in stop_if_high_cardinality(data, columns, cardinality_threshold) :
Column 'Source' has more levels (51) than the threshold (15) allowed.
Please remove the column or increase the 'cardinality_threshold' parameter. Increasing the
cardinality_threshold may produce long processing times发布于 2020-04-30 22:10:07
如错误所示,消除错误的方法是设置cardinality_threshold=NULL或cardinality_threshold=51,因为Source和Destination都是51个级别的因子变量。
然而,他们很可能很难在图中看到任何细节,如果它真的绘制了,因为图的一个面板将尝试拟合51个柱状图,其中有51个列。您可能想要考虑对您感兴趣的分析将您的因素级别分组是否有意义,或者排除这些因素(尽管这只剩下两个连续变量)。
https://stackoverflow.com/questions/61524929
复制相似问题