0

I found myself confused by ggsave not accepting the res argument.

ggplot()
ggsave("p.png", res = 300)

Error in grDevices::png(..., res = dpi, units = "in") : formal argument "res" matched by multiple actual arguments

Luckily, user Roland's comment in this thread helped. I decided to ask a new question because editing the former to the core of the problem seemed more work.

A closer look into ?ggsave might have helped too.

tjebo
  • 21,977
  • 7
  • 58
  • 94

1 Answers1

0

Weirdly, and I find very confusingly, ggsave seems to have a different name for the "res" argument in grDevices::<device>

use ggsave(dpi = ...), if you want to change grDevices::<device>(res = ...)

tjebo
  • 21,977
  • 7
  • 58
  • 94