Re: [R] How to use different title in a loop

2008-12-08 Thread Aval Sarri
see ?paste main = paste ("Main effect of ", variable) > par(mfrow = c(n/2, 2)) > for ( i in 1:n) > { >plot(1:J, y[i, 1: J], main = 'Main effect of X_i') > } > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

[R] How to use different title in a loop

2008-12-08 Thread Xinxin Yu
Hi all, I want to draw n plots whose titles are "Main effect of X_i", i= 1, 2, ..., n, respectively. More specifically, I use: par(mfrow = c(n/2, 2)) for ( i in 1:n) { plot(1:J, y[i, 1: J], main = 'Main effect of X_i') } This gives me a series of plots with the common title with a l