The second boxplot on the image in the OP is "flat" because it has a range of 0 - 1 when the first boxplot has a range of 0 - 25,000. boxplot()
is working correctly.
A more useful chart would be to produce 2 boxplots of the Accept
variable, one for each value of Private
, using the following syntax:
boxplot(Accept ~ Private,data=college)
Since the OP did not include a Complete, Minimal, and Verifiable Example, here is an example boxplot with generated data.
set.seed(100317)
acceptPrivate <- rnorm(500,mean=5000,sd=2000)
acceptPrivate[acceptPrivate <0] <- 10
acceptPublic <- rnorm(500,mean=15000,sd=4000)
acceptPublic[acceptPublic <0] <- 10
Private <- c(rep(1,500),rep(0,500))
college <- data.frame(Private,Accept=c(acceptPrivate,acceptPublic))
boxplot(Accept ~ Private,data=college,main="Accept by Private")

One could make the chart easier to understand by converting the binary Private
variable to a factor.
# convert Private to factor
college$Private <- factor(college$Private,labels=c("Public","Private"))
boxplot(Accept ~ Private,data=college,main="Accept by College Type")
