barplot(table(ordered(cancer$agecat,
c("Younger than 31","31 to 41","42 to 54","55 or Older"))),
main="Ordered Bar Chart of Age Categorie",ylim=c(0,120),
xlab="Number of People In Each Category")
之前有效,一切都很好但现在没什么了。
1 个答案:
答案 0 :(得分:0)
查看cancer$agecat中的值,这可能就是原因。这是一个有效的例子:
barplot(runif(4), names.arg = ordered(c("Younger than 31","31 to 41","42 to 54","55 or Older")),
main="Ordered Bar Chart of Age Categorie",ylim=c(0,1),
xlab="Number of People In Each Category")