Is pdf() the function underpinning export>save to pdf button in Rstudio?

Is the save to pdf button under plots>internally calling the pdf() function? Thus, would it be equivalent to this chunk of code?:

simple_plot %>% pdf(file = "plots/simple_plot.pdf",
    width = 6, # The width of the plot in inches
    height = 8) # The height of the plot in inches

I would like to automate my saving to PDF process. I am also confused if using Cairo PDF is a better option.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.