powered by
Execute a plot string expression and output the result to the specified file format.
plot_string_to_file(file, file.format = c("pdf", "png", "svg", "tiff"), plot.string)
string. The name of the file, can be a full path.
string. The output file format. Can be one of these: pdf, svg, png or tiff.
string. The plot string expression.
# NOT RUN { x = 1:10 y = 1:10 plot_string_to_file(paste0(tempdir(), "/my_file.pdf"), "pdf", "plot(x,y)") # }
Run the code above in your browser using DataLab