I'm trying to get 300 dpi images with ggsave, and am only getting the default 72 dpi.
Here's an example of the code I'm using:
library(tidyverse)
x <- rnorm(100, 5, 1)
x <- tibble(x)
ggplot(x, aes(x = x)) + geom_histogram()
ggsave("hist.png", width = 10, height = 10, units = "in", dpi = 300)
When I run this I get a 72 dpi .png file. I'm using a MAC with Catalina 10.15.7 and updated to the most recent versions of R and ggplot2 today.