I have plotted box plot for my data using given command and trying to write text (p-value ) in it.
Using :
boxplot(data,ylab = prop_index[i])
text(1:2 - 0.4, data[,1]/2, paste("p-value=",p_val))
I applied "text" command but noting has appeared on image. Please tell me appropriate method to apply this command
x1 <- rnorm(500)
y1 <- sample(c("a", "b", "c"), 500, replace=T)
boxplot(x1 ~ y1)
text(x= 1, y= 3, labels= "some text")
text(x= 2, y= 3, labels= "more \n text")
text(x= 3, y= 3, labels= "red text", col= "red")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With