Sunday, 18 August 2013

Transpose plots on a graphics device R

Transpose plots on a graphics device R

par(mfrow=c(3,2))
plot(density(rnorm(100)))
plot(density(rexp(100)))
plot(density(rnorm(100)))
plot(density(rexp(100)))
plot(density(rnorm(100)))
plot(density(rexp(100)))
This gives me a 3x2 array of 6 plots. Can I transpose this array without
redoing my code? (The original code that produced the plots is quite a bit
more complicated than the above :) -- I am trying to beamer-ize something
made for a latex A4 doc.)

No comments:

Post a Comment