Boxplots in R

Поділитися
Вставка
  • Опубліковано 16 лип 2020
  • In this vid, we use the qplot() command in the {ggplot2} package to produce gorgeous boxplots in R. Note: since I recorded this vid, the qplot() command has been deprecated. Check out • Better box plots in R ... for a more up-to-date approach.
    If this vid helps you, please help me a tiny bit by mashing that 'like' button. For more #rstats joy, crush that 'subscribe' button!

КОМЕНТАРІ • 33

  • @EquitableEquations
    @EquitableEquations  Рік тому +2

    The qplot() function still works but was deprecated in ggplot 3.4.0. Check out ua-cam.com/video/ETbFdSvPwUw/v-deo.html to make boxplots using the powerful ggplot() function!

  • @jinjiyanazadi7811
    @jinjiyanazadi7811 Рік тому

    Thank you for this tutorial . It helped me .

  • @Live4Christ155
    @Live4Christ155 Рік тому

    Thank you for this, very helpful! ...

  • @andreaisland6790
    @andreaisland6790 3 роки тому +4

    This saved me! Massive thanks!

  • @romanvasiura6705
    @romanvasiura6705 Рік тому +1

    Thank you!

  • @harrisonn9792
    @harrisonn9792 Рік тому +1

    Thank You

  • @petravondalova7926
    @petravondalova7926 3 роки тому +2

    Thank you for saving me! :)

  • @vincenzo4259
    @vincenzo4259 2 роки тому +1

    Thanks

  • @asiatyes1777
    @asiatyes1777 Рік тому

    this helped a lot, I have to use Rstudio to make a t test and I have never in my life used it lmao

    • @EquitableEquations
      @EquitableEquations  Рік тому +1

      Yay! I'm glad it helped. I have a whole vid on t.test(), by the way:
      ua-cam.com/video/oNpfjcIf2Es/v-deo.html

  • @mariajoseherrerareyes8633
    @mariajoseherrerareyes8633 Рік тому +1

    Hi, thanks for your video! do you know how to delete the guide or legend that's in the right side (in your example says seeds and the color of each group)?

  • @dimariscolonmolina2223
    @dimariscolonmolina2223 3 роки тому

    Hello, I have a data that includes sampling timeline (August/September vs October/November), count of bivalves and gastropods in 4 selected beaches, and I want to create two graphs of boxplots with x-axis (sampling events mentioned above) and y-axis (mean abundance of bivalves, mean abundance of gastropods) and for the boxplots that could be filled with the colors of the four selected beaches( which are green= Mayaguez, orange= Rincon, blue=Anasco and red=Cabo Rojo) do you know how can do this in R? Thank you

    • @EquitableEquations
      @EquitableEquations  3 роки тому

      Hi! You could consider faceting to get side-by-side plots, or using both color and fill aesthetics to contrast the different categorical variables. I talk about some of these options in the second half of my vid on the ggplot() function:
      ua-cam.com/video/FAvESE3WC30/v-deo.html

  • @ayoubbensalih5774
    @ayoubbensalih5774 Рік тому

    How I can add min and max and average in the box plot representation???

  • @samanthadesilva9740
    @samanthadesilva9740 3 роки тому

    Hi, when I do this my data isn't automatically grouped (on the y) - it makes one big box plot for all my groups (so instead of casein, horsebean etc I get one plot for feed but using my own data)

    • @EquitableEquations
      @EquitableEquations  3 роки тому

      Hi! If I had to guess, I'd say that your data probably isn't in the correct (tidy) format. You may need to post your code on a Q&A site like stackoverflow to get specific help.

  • @ask4joshua10
    @ask4joshua10 3 роки тому +2

    how do we rearrange the boxes? very nice ..

    • @EquitableEquations
      @EquitableEquations  3 роки тому +2

      This is the most direct way:
      qplot(x = factor(msleep$vore, levels = c("omni", "carni","herbi", "insecti")), y = msleep$sleep_total, geom = "boxplot")
      I'm producing a more complete explanation of factors in R right now.

  • @rajendraregmi2892
    @rajendraregmi2892 Рік тому

    very easy and clear video to understand. can you give me some idea to make box plot with two factors trestments?

    • @EquitableEquations
      @EquitableEquations  Рік тому

      Hi! You can do side--by-side plots by including additional aesthetics like group, fill, or color. You might also consider faceting with facet_wrap or facet_grid.

    • @rajendraregmi2892
      @rajendraregmi2892 Рік тому

      @@EquitableEquations can you write commands for that?

    • @EquitableEquations
      @EquitableEquations  Рік тому

      For specific questions like this, consider the R4DS learning community, for instance on Slack.

  • @l.3539
    @l.3539 2 роки тому

    Hi, how can i remove na values of my data in qlot?

    • @EquitableEquations
      @EquitableEquations  2 роки тому

      Hi! I use the drop_na() function from {dplyr} to remove rows with NAs. Honestly, though, if you're doing anything beyond basic plots, you'll want to learn the ggplot() function, which is much more powerful:
      ua-cam.com/video/FAvESE3WC30/v-deo.html

  • @fasihakhan5319
    @fasihakhan5319 2 роки тому

    Video is admirable but backspace or deleting commands are not workable ... not user friendly

    • @EquitableEquations
      @EquitableEquations  2 роки тому +1

      Thanks for watching, Fasiha. This is a beginner's video, so I avoided all but the most basic tools. You can see something a bit more elaborate here:
      ua-cam.com/video/FDngvXOGstA/v-deo.html

    • @fasihakhan5319
      @fasihakhan5319 2 роки тому

      Thanks sir.. But i hv no IQ for programming. I m phD scholar writing up but its hard for me to draw graphs by using commands..

    • @fasihakhan5319
      @fasihakhan5319 2 роки тому

      @@EquitableEquations Sir hard for me as biologist has no aptitude for programing commands and having biological data

    • @rajendraregmi2892
      @rajendraregmi2892 Рік тому

      @@fasihakhan5319 Again I am looking for two factors, can you just write command for two factors analysis. Thank for nice video.