boxplot for comparison | before and after| group cross group comparison| ggplot2| R

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • In this video, you will be able to create a boxplot within-group and cross-group comparisons. I often make sure that you can access the same dataset as in my video and I also upload the full R code that I used in my video. I hope you find them helpful and let me know if you have any comments or questions.
    0:30 the kind of data
    1:55 use ggplot
    3:55 change factor levels
    4:45 change colors of boxes
    The dataset I used in this video is here (a data set I used some random numbers): github.com/yz-...
    The R code for this video is here: github.com/yz-...
    Code together with me as you watch the video. I believe you will get exactly the same graph as I did.
    Special thanks to my biologist friend who asked me to help her create this kind of graph and I found it to be a super useful graphic tool.

КОМЕНТАРІ • 34

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

    Hi I'm Morrel Mr/Dr. Morrel and my Chinese name is Dalong:)! This is my first time to talk about me/myself here. I'm not a fan of anyone here, but I can say your videos or teaching are more better than others. Maybe some people were born for teaching. I also know much that in China the people love teaching job or to be a teacher. In constrast, to our homeland (Generally speaking). There are people who were intelligent during their studies, but there aren't good at teaching and others were average and they became good at teaching. According our homeland I wasn't like teaching at the beginning (B.S+M.S), (when I was student) and at the end when the government employed me, I started to teach and pupils/students loved me. Brief, it is a very good job (Teachers or profs. learn a lot in teaching). So, for this video, let me watch it and ask question(s) if I have. Thank you!

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

    Excellent series. Very clear . Do continue the series to complete the text.

  • @deboraribeironascimento3583

    thanks for your suport

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

    Sorry, except R software we downloaded, we also need to download ggplot (ggplot2) before running, right?

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

    Good demonstration. But, I could not find the boxplots inside the graphic, I only find the legend (stage). Instead of boxplots, it appeared lines. I do not know what the hell is that

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

    I followed the steps, very practical, unfortunately in the graphic area instead of groupped boxplots it appears groups of minus (features) in mine

  • @tchistermorrelebissa8628
    @tchistermorrelebissa8628 6 місяців тому

    Rstudio, R 4.2.3

  • @tchistermorrelebissa8628
    @tchistermorrelebissa8628 5 місяців тому

    In order to find what I made you may send me your second or third e-mail. PLZ. To enter into it and see it you may convert it to Internet explorer after receiving it. Still not make it in the way you did. I need a hand. Thank you!

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

    Very good content 👏🏻

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

    Thanks a lot..
    As a side question:
    what is the difference between is.factor and factor ?

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

      factor is to change it into factor levels; is.factor is a logic check, it will return true or false results.

  • @WheatAndrogenesisRatib1993
    @WheatAndrogenesisRatib1993 8 місяців тому

    How you make a video for same example using repeated measure anova

  • @tchistermorrelebissa8628
    @tchistermorrelebissa8628 4 місяці тому

    If it was possible to paste or add here I'll do it. I mean that I'll show up my error or maybe my r software is missing something

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

    Could you zoom the raw data? PLZ.

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

    I wonder whether another thing or software is missing. Many thx

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

    Mine it still appears like this: _ _ _ _ _ _, only legend appeared well

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

    Error in install.packages : Updating loaded packages
    > ggplot(crab_data,aes(x=species,y=weight,fill=stage))+
    + geom_boxplot()
    Error in ggplot(crab_data, aes(x = species, y = weight, fill = stage)) :
    could not find function "ggplot"
    > ggplot(crab_data,aes(x=species,y=weight,fill=stage))+
    + geom_boxplot()
    Error in ggplot(crab_data, aes(x = species, y = weight, fill = stage)) :
    could not find function "ggplot"

  • @tchistermorrelebissa8628
    @tchistermorrelebissa8628 6 місяців тому

    I tried to follow You unfortunately my boxplot it appears minus or dash

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

    Excuse me, what code you mean? The procedure?

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

    Sorry , can't follow, because I don't the data well

  • @tchistermorrelebissa8628
    @tchistermorrelebissa8628 6 місяців тому

    Perhaps, if I may have an email address I will save what I done and sent it to You. Thank you!

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

    Mine: Error in library(readx1)

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

      The best way is to follow my instruction and import the dataset from your computer. If you want to type it out, it is library(readxl). The last one thing is letter l not number 1

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

      @@datasciencewithyan4124 Thank you for clarifying me:)!