learn@MDL
Use ggsave() to save plots.
ggsave()
# Store the last plot as an object linegraph <- last_plot() # Save the last plot to a file ggsave("lfs_2025_linegraph_last.png") # Save a specific plot to a file ggsave("lfs_2025_linegraph.png", plot = linegraph, width = 8, height = 5, dpi = 150)