On Wed, 10 Nov 2021, Rich Shepard wrote:

I have the code to create ggplot2 boxplots using two attributes (e.g.,
chemical concentration and month) from the same tibble. Is there an
example from which I can learn how to make boxplots from different
tibbles/dataframes (e.g., chemical concentrations and monitoring
location)?

I think that I've found the solution (haven't yet tested it, though):
<https://statisticsglobe.com/combine-two-ggplot2-plots-from-different-data-frames-in-r>.

It's from Statistical Globe and uses this code:
ggp <- ggplot(NULL, aes(x, y)) +    # Draw ggplot2 plot based on two data frames
  geom_point(data = data1, col = "red") +
  geom_line(data = data2, col = "blue")
ggp                                 # Draw plot

More when I try it with four boxplots.

Rich

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to