Error trying to plot histogram

I've seen this backtrace asked about in a number of places, but no good solution was provided.

Could you offer a minimal reprex of the code you ran which created this error message?

If it's just hist(...), I'd restart R (in RStudio, Session >> Restart R) and try again.