Chapter 8 Video 12 - Multiple Plots - Combining Plots in R (with ggplot2)
ฝัง
- เผยแพร่เมื่อ 7 ต.ค. 2024
- In this video, we examine combining multiple plots in R using the patchwork package.
This is the 12th video of Chapter 8 for the book Quantitative Social Science Data with R, 2nd Edition (Sage).
April 2023 Update: Data & codebooks are now available for these R tutorials: study.sagepub....
I would to ask what would be the code if I want to make the combined plot as a new plot. (like a new figure contain the two plots) pls help TT
Hi, While combining the graphs, I get the error "non-numeric argument to binary operator" . please help.
Hmmm. Generically, the error means you are trying to do something that requires numeric vectors (etc) but you are using non-numeric vectors (etc.). I don't think that matters here. My guess is that the patchwork package is not loaded (`library(patchwork)`). I got the same error as you when I didn't first run `library(patchwork)`. So, double check that.