I used one Excel input to do boxplot, and the code is real simple and effective, which led me to a looking-good figure. The code:
boxplot(NSN$`NN`~NSN$C,main="NNBI",ylab="CN",xlab="CR",col=c("blue","red"),ylim=c(0,50000))
But later I tried to mark the significant difference level among boxplots, and after searching I found a package called"ggpubr". So I run the code as instructed and get the errors as following:
> ggboxplot(NSN)
Error in .check_data(data, x, y, combine = combine | merge != "none") :
x and y are missing. In this case data should be a numeric vector.
> ggboxplot(NSN, x = "CR", y = "CN",merge = FALSE)
Error in `[.data.frame`(data, , x) : undefined columns selected.
Here I have two questions, 1.Generally speaking, for Excel input, how can I turn to numeric format so that I can calculate the differences among data? 2.How can I get the significance marked in boxplot here?
See this post on Biostars
Boxplot in ggplot2
and if it’s not enough, go to stackoverflow.
https://stackoverflow.com/questions/29263046/how-to-draw-the-boxplot-with-significant-level?rq=1