When I teach histograms using R, I use the yaxp parameter to adjust the y-axis. Here is an example of the code:
hist(bookspending$'Dollars on books', yaxp = c(0,9,9))
This produces a histogram where the y-axis has tick marks at 0, at 9, and a tick mark at every integer in between. Here is a picture of it:

I'm using Rstudio version 1.4.1717 and R version 4.1.1. This has worked the past 4 years. This semester the yaxp parameter isn't working for some students. I replicated the problem using the web-based version of R. Using the same code, the yaxp parameter makes no changes to the histogram. Here is the picture:

Why does yaxp no longer work for the online version, but it works for my version? How do you adjust the y-axis without yaxp?