2017-08-09 4 views
-2

これはRの横棒グラフで、x軸には数があり、y軸にはラベルが付いているのですが、これは簡単ですがggplotではできません入力テーブルデータどうすればggplotを使って棒グラフにするのですか

>table(df$Primary.Issue.Category) 
    Billing, coverage, coordination of benefits   Concern over standard receipt time    Difficulty finding new supplier Difficulty receiving products in general 
               6           1           4           89 
     Difficulty receiving specific products      Low quantity/quality Problems repairing due to service issues     Supplier compliance issues 
               3           10           9           8 
       Supplier fraud, waste, or abuse      Supplier service issues 
               2           4 
+0

df<-as.data.frame(table(df$Primary.Issue.Category)) names(df)<- c("labels", "counts") ggplot(df, aes(x=labels, y=counts)) + geom_bar(stat='identity') + coord_flip() 
の可能性のある重複[ggplot2における水平Barplot(https://stackoverflow.com/questions/10941225/horizo​​ntal-barplot-in-ggplot2) – useR

答えて

関連する問題