[R Beginners Tutorial] Plot and customise boxplot using GGPLOT in RStudio . Code included

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • Learn to plot box plots, customise various aspects of the plots and plot the mean values and the mean confidence intervals as well.
    Here is the code rpubs.com/tech...
    #datavisualisation #ggplot #boxplot #statistics
    box plot in r
    ggplot boxplot
    boxplot rstudio
    r boxplot
    rstudio boxplot
    ggplot2 boxplot
    boxplot en r
    boxplot in rstudio
    boxplot in r studio
    ggplot r studio
    rstudio ggplot
    boxplot excel
    boxplot ggplot
    boxplot in r ggplot2
    boxplot r studio
    ggplot r
    ggplot2 r studio
    how to make boxplot in r
    boxplot with outliers
    ggplot rstudio
    box plot diagram explained
    confidence interval in r
    ggplot in rstudio
    how to make box plot
    Step by step approach and quick explainations for beginners.
    Learn to customise the order of the plot. Use continuous data and create box plots by binning the continous data to different binned groups.
    Other data visualisation videos
    • GGPLOT charts and char...
    Subscribe: www.youtube.co...

Комментарии • 19

  • @hosnearaakter3801
    @hosnearaakter3801 3 года назад +3

    It's an excellent easy presentation! Thank you very much. It helped me a lot. Wish you will deliver such easy presentation more for us specially for biginers.

  • @ypurutcu
    @ypurutcu 3 года назад +2

    Crystal clear teaching. Thank you very much for sharing.

  • @yusmanisleidissotolongo4433
    @yusmanisleidissotolongo4433 2 года назад +2

    Yes, the only thing I can say is EXCELLENT and THANKS so much!!!!!!!

  • @mayaheredia8621
    @mayaheredia8621 3 года назад

    Gracias infinitas el mejor video que he visto. ;)

  • @clarascalise1597
    @clarascalise1597 Год назад +2

    I'm running this code: p

    • @DataAnalytic
      @DataAnalytic  Год назад

      Hi
      Your code is absolutely correct, but you are just one character away from getting the results.
      You have created an chart object p but not asked the script to print it.
      So on a new line just add p and you would see your plot, here just recreating your script again.
      p

  • @univ41soukahras48
    @univ41soukahras48 Месяц назад +1

    hi, I have a problem when I want to run the following code to have a boxplot:
    boxplot(data_ind$Na~data_ind$Stations, range = 1.5,
    width = NULL, varwidth = FALSE, notch = FALSE,
    col = c("blue","red","orange","gray"),
    xlab = "", ylab = "Na %",)
    the following message appears:
    Error in plot.new() : figure margins too large. and the drawing does not appear
    the range of the variable Na% from 17.39 to 43.02

    • @DataAnalytic
      @DataAnalytic  Месяц назад +1

      Hello
      You are not using the GGPLOT boxplot you are using the BASE R to plot your chart.
      You can try to use the dev.off() command to see if it works for you.
      Check the margings using this command par("mar")
      set the margins by the following command
      par(mar=c(1,1,1,1))
      Here is an example
      library(tibble)
      data

    • @univ41soukahras48
      @univ41soukahras48 28 дней назад +1

      @@DataAnalytic thanks

  • @danielrico3352
    @danielrico3352 2 года назад +1

    Great video! I just have one question. When I write features within geom_boxplot, the fill (inside aes) disappear! How can I enter the characteristics I want (colors of the box plot, outlier.color, etc) without my legend that I put in fill (aes) disappearing? Thanks in advance!

    • @DataAnalytic
      @DataAnalytic  2 года назад +2

      Hi
      Thanks for your message.
      you can try running this code and see if this is what you wanted.
      With the legend
      p

    • @danielrico3352
      @danielrico3352 2 года назад

      @@DataAnalytic Oh, thanks! I tried as well with only alpha and outline.color inside geom_boxplot then with scale_fill_manual(values = c(...)) to put color in my box plot. With theme(legend.position = ...) I tried many different positions! It works!

  • @diyanaibrahim8676
    @diyanaibrahim8676 3 года назад

    hey, I was wondering if you know why I don't or can't do the fill = feed part. my R keeps telling me that the object "feed" is not found. the command fill is apparently also not available to me.

    • @DataAnalytic
      @DataAnalytic  3 года назад

      Hi, if the object 'feed' is not found indicates that the dataframe which you passed to ggplot does not have that field. Check the data frame by calling the command head(chickwts). Also here is the command and try copy and paste it in your rstudio and it should work.
      Also note that the fill should be within the aes() as shown below.
      library(ggplot2)
      ggplot(data = chickwts, aes(x = feed, y = weight, fill = feed)) + geom_boxplot(aes(y = weight))
      All the best!

  • @user-hs5gf3wy1v
    @user-hs5gf3wy1v Год назад

    How can you insert different types of feed in box plot?

    • @DataAnalytic
      @DataAnalytic  Год назад

      Hi Please have a look at the code here rpubs.com/techanswers88/boxplot