I’ve not added tips for a while. Here is it for today:

1. How to add title for graph with multiple plots?

par(mfrow=c(1,2),oma = c(0, 0, 2, 0))

plot(1:10, main=”Plot 1″)

plot(1:100, main=”Plot 2″)

mtext(“Title for Two Plots”, outer = TRUE, cex = 1.5)

2. How to add text (e.g. asterix for significance) onto a boxplot?

boxplot(len ~ dose, data = ToothGrowth, outline=F)

text(x=2,y=max(boxplot.stats(ToothGrowth$len[ToothGrowth$dose==1])$stat), paste(“n”,sum(ToothGrowth$dose==1),sep=”=”), pos=3, offset=.2, cex=.8)

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** One Tip Per Day**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...