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....

ความคิดเห็น • 3

  • @itsmydaily3412
    @itsmydaily3412 6 ชั่วโมงที่ผ่านมา

    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

  • @prashantchoudhary138
    @prashantchoudhary138 ปีที่แล้ว

    Hi, While combining the graphs, I get the error "non-numeric argument to binary operator" . please help.

    • @qssd
      @qssd  ปีที่แล้ว

      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.