Reputation: 115
I am trying to make a bar plot for qualitative variables. In the following situation:
library(ISLR)
df <- College
barplot(table(df$Private))
Why does the count for "yes" fo past the limit of the Y-axis?
library(ISLR)
df <- College
barplot(table(df$Private), ylim=700)
To correct this, why do I get an error for when I try to increase the limit of the y-axis?
Upvotes: 0
Views: 31
Reputation: 21400
You need to specify a range from ... to ... . The correct input is:
ylim = c(0, 700)
Feel free to take whatever else instead of 0
.
Upvotes: 3