[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...
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.
Crystal clear teaching. Thank you very much for sharing.
Glad you enjoyed it!
Yes, the only thing I can say is EXCELLENT and THANKS so much!!!!!!!
Glad you liked it!
Gracias infinitas el mejor video que he visto. ;)
Thanks a lot. Gracias !
I'm running this code: p
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
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
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
@@DataAnalytic thanks
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!
Hi
Thanks for your message.
you can try running this code and see if this is what you wanted.
With the legend
p
@@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!
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.
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!
How can you insert different types of feed in box plot?
Hi Please have a look at the code here rpubs.com/techanswers88/boxplot