[R] plot in for loop with "i" indexed variables does not work

mgilgen at swissonline.ch mgilgen at swissonline.ch
Wed Aug 22 10:56:51 CEST 2007

Hi there

Does anyone know, why this is not working?:

par(mfrow = c(5, 5))

for (i in 1:10){
	plot(x=time, y=Var.i)

(x-variable is time
y-variable is Var out of matrix with columns Var.1 Var.2 Var.3 etc...)


for (i in 1:10){
	plot(x=time, y=paste("Var", i, sep=".")

does not work



More information about the R-help mailing list