-2

Here is what I have.

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")

This worked before, everything showed up fine but now nothing.

  • Please provide a minimal reproducible example. See http://stackoverflow.com/q/5963269/4303162 and https://meta.stackoverflow.com/questions/315885/what-is-the-correct-way-to-share-r-data-on-stackoverflow – Glen_b Mar 16 '17 at 03:31

1 Answers1

0

have a look to the values in cancer$agecat, that might be the reason. This is a working example:

 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") 

enter image description here

Edgar Santos
  • 3,426
  • 2
  • 17
  • 29