[R] BoxPlot Adding Mean and Median Values

Jayaganesh Anbuganapathy j@|6561 @end|ng |rom |c|oud@com
Thu May 10 04:55:48 CEST 2018


Hello Dave

Here is the code I have tried.

getwd()
setwd("D:/BAP Session/Nuance")
getwd()
AmbientTr <- read.csv("AmbientBatchbox.csv", stringsAsFactors = TRUE)

str(AmbientTr)
summary(AmbientTr)

install.packages("ggplot2")
library(ggplot2)

boxplot(RTF~Batch,data=AmbientTr, ylim = c(0,30), main="RTF By Batch", 
xlab="Batch", ylab="RTF", col ="blue")

As I mentioned below, would like to add the data labels into each box of mean value
Can you help on this what needs to be added in this code to show the data labels.




On May 09, 2018, at 08:10 PM, David L Carlson <dcarlson using tamu.edu> wrote:

Your snapshot did not make it to the list. Only a few types of plots are accepted, e.g. .png. But we don't need a picture as much as we need a copy of your code with enough of your data to reproduce what you are trying to do. Use dput(head(x, 15)) to print out 15 lines of your data and include all of the R code you are using.

----------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352

-----Original Message-----
From: R-help <r-help-bounces using r-project.org> On Behalf Of Jayaganesh Anbuganapathy
Sent: Tuesday, May 8, 2018 11:10 PM
To: r-help using r-project.org
Subject: [R] BoxPlot Adding Mean and Median Values

Dear Team - I would like to get your help on adding the values of mean and median of RTF as mentioned in the below snapshot. 

Please guide me out. Thanks for your help in advance.




______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list