首页 > 解决方案 > How to draw values lower than ... in pie chart?

问题描述

I have uploaded the CSV file (searches.csv is now searches) and I need to draw a PIE CHART with values bigger than 1000. I use 2 columns from that CSV file: count and residence. residence contains countries, they are not unique: US US US UK etc. count- its a number.

I did an aggreagtion:

data1= aggregate(searches$count, 
              by=list(searches$residence), FUN=sum)
colors = c("red", "yellow", "green", "violet", "orange", "blue", "pink", 
"cyan") 
print(data1)
pie(data1$x, data1$Group.1,col=colors,main="Pie Chart of Countries")

My question is: where should I put the condition for values (summed ones) lower than 1000 (sum of counts for particular country)?

标签: rpie-chart

解决方案


推荐阅读