I am pretty sure @andresrcs 's reply will be what you're looking for. However, I have had troubles in the past saving really really big R plots at like 600 dpi at 30cm x 30cm with default saving because of Windows specifically and I got around the problem by using a different graphic engine.
This is an exmaple of png but I see you are able to change type to tiff
.
library(Cairo)
Cairo::Cairo(
30, #length
30, #width
file = paste("nameofplot", ".png", sep = ""),
type = "png", #tiff
bg = "transparent", #white or transparent depending on your requirement
dpi = 300,
units = "cm" #you can change to pixels etc
)
plot(p) #p is your graph object
dev.off()