[R] ggplot2: multiple box plots, different tibbles/dataframes

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Thu Nov 11 18:56:22 CET 2021

On Thu, 11 Nov 2021, Bert Gunter wrote:

> You can always create a graphics layout  and then plot different
> ggplot objects in the separate regions of the layout. See ?grid.layout
> (since ggplots are grobs)  and ?plot.ggplot  . This also **may** be
> useful by showing examples using grid.arrange()
> https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html
> Still, I suspect that Jeff Newmiller may be right about needing to
> structure your data more appropriately for what you wish to do.


For this plot I could create a new data set with only site_nbr, year and cfs
columns; it would be 3,016,005 rows long.

Or, I could create separate boxplots and arrange them in a row. That might
be the easiest.



More information about the R-help mailing list