Hi all, I have a problem in including my plot in a loop. Here is a simple example for one plot:
# Plot simple graph with super- and subscript a<-c(1,2,3,4) b<-c(1,2,3,4) plot(x=a,y=b, ylab=expression(paste("Apple"["P"])), xlab=expression(paste("Banana"^"th")), main=expression(paste(italic("i-")~"4"^"th"~"choice"))) Now I would like to include the titel (main) as a function of the number of trails for (trial in 1:nTrials) { plot( main=expression(paste(italic("i-")~"trial"^"th"~"choice"))) } e.g. nTrials = 5 The title should look like this: 5th plot: i ^th choice 4th plot: i-1 ^th choice 3th plot: i-2 ^th choice and so on I have problems to create that, could you please help me? Thank you!! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.