Combine plots in R -


i have several plots want combine them , add title combined plot, somehow cannot combine them using r. (using rstudio)

  1. combine 2 residual plots plotted using plot(resid(lme)) lme linear mixed model.
  2. combine 2 interaction plots plotted using interaction.plot(x1,x2,y) x1 , x2 2 independent variables, , y dependent variable.

i tried store plots variables , use grid.arrange, cannot stored variable (just produce plot in plot area).

i.e.

> int1 <- interaction.plot(data_pos_10$day,data_pos_10$drug,data_pos_10$tumor.volume, +                  xlab="day",ylab="tumor volume",main="interaction plot batch 10", +                  legend=f, +                  col=c("red","red","green","black","blue"), +                  lwd=2, +                  lty=c(1,2,3,4,5)) > int1 null 

before plotting code, run par(mcol=c(2,1)) stack them vertically or par(mcol=c(1,2)) stack them horizontally.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -