标签: r
如何根据以下数据摘要在R中创建饼图和条形图:
sudo systemctl restart httpd.service
答案 0 :(得分:1)
尝试:
gender <- c(518, 482) names(gender) <- c("male", "female") pie(gender, names(gender)) barplot(gender)
与您的其他类别相同,例如
groups <- c(89, 190, 319, 262, 140) names(groups) <- c("A", "B", "C", "D", "E") pie(groups, names(groups)) barplot(groups)
返回: