1
我有這樣大熊貓:重塑數據幀進行堆疊條形圖
meaning label \
0 hypertension 0
1 angina 5
2 angina 9
percentFeatureInCluster percentFeatureInPop
0 33.781654 30.618880
1 24.916958 3.768201
2 4.663107 3.768201
我感到意義試圖組數據幀,並獲得了堆疊條形圖因爲有行,其中有每含義許多酒吧在每個組+額外的一個百分之一FeatureInPop。
即這將是我找的,我可以很容易地用於plot.bar(堆疊= TRUE),並得到我要找的情節數據幀。
meaning percentFeatureInCluster0 percentFeatureInCluster5
hypertension 33.781654 0
angina 0 24.916958
percentFeatureInCluster9 percentFeatureInPop
0 30.618880
4.663107 3.768201
這是如何實現的?
哇,不錯,很乾淨 – cosmosa
@ cosmos1990高興能幫上忙 – piRSquared