R software, making boxplot, need finite ‘ylim’ value

r

> B<-subset(olympic,sport=="basketball")
> BM<-subset(B,sex=="M"
+ )
> boxplot(BM$height)

Error in plot.window(xlim = xlim, ylim = ylim, log = log, yaxs = pars$yaxs):
need finite 'ylim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf

This is what happened when I try to plot the graph. I'm new to R.

Best Answer

Just add ylim=c(0,300)) to your code

Related Topic