Рет қаралды 2,039
*Note: I may be compensated, but you will not be charged, if you click on the links below.
In this video, Monika Wahi shows you how to use the ggsave() command to export a box plot she made in ggplot2 in R GUI. See her blog post with other videos on box plots here: buff.ly/3uK49fN
Files on Github: buff.ly/3xF6H27
Data from American Hospital Directory: www.ahd.com/
More about ggsave: ggplot2.tidyve...
Box plot blog post with more information: buff.ly/3uK49fN
Video where we make the base box plot: • How to Make Box Plots ...
Recording of livestream demonstration: • Box Plots and Percenti...
Want free advice from Monika? Register for a free 30-minute consultation on Zoom: calendly.com/d...
Want an exciting educational opportunity? Join Monika’s upcoming online workshop, “Application Basics”: dethwench.com/...
For great data science resources, follow the company page for Monika’s company, DPS: / dethwench-professional...
To be notified of new learning resources, register for Monika’s mailing list: mailchi.mp/730...
💙Follow Monika’s blog: dethwench.com/...
💚Subscribe to Monika’s KZbin channel: / @dethwench
💜Follow Monika on X: / dethwench
🤍Follow Monika on Instagram: / dethwench
🤎Get code from Monika’s GitHub: github.com/Det...
💛Follow Monika on Mastodon: fosstodon.org/...
🖤Follow Monika on Quora: publichealthda...
Timestamps and links as the come up are below:
00:29 Explanation of the problem that ggsave() solves
00:49 Introduction to the base code we are using to create the plot we are saving
01:08 Description of the base dataframe we are using for the plot
02:22 How this plot will be used to demonstrate ggsave() in this video
02:45 Running base box plot code - modified to save the plot as an object named boxplot_figure
04:00 Explanation of the problem of the default dimensions of the plot object
04:10 Menu-driven approach for manually saving the plot from current R GUI session
04:30 How to manipulate the size of the plot manually in R GUI and save it
05:25 Introduction to ggsave() code
05:32 First argument: name of file to save
05:54 Next argument: specify units
06:14 Next arguments: specifying dimensions
06:34 Next argument: specify dots per inch (dpi)
06:43 Next argument: name of plot object
07:06 Running ggsave() code, and locating the exported plot in the working director
07:35 What the box plot object saved as a *.png with specified dimensions looks like
How to Use ggsave() to Export a Plot in R - Demonstration