Hi All, I've been having a little trouble using R2HTML and a loop, but can't figure out where the problem lies, any hints gratefully received.
My code at the minute, (Which does work) is in the following: library(R2HTML) HTMLStart(outdir = file.path("C://Example_work","R_projects","Dynamic_creative"),filename = "RMDC_mockup",Title="Mock up for RMDC") summary(z.out.1) summary(s.out.1) hist(s.out.1$qi$ev) HTMLplot() . . . summary(z.out.3) summary(s.out.3) hist(s.out.3$qi$ev) HTMLplot() HTMLStop() This seemed a rather long winded way of doing things to me and a simple for loop should handle this, as later i want it to be dynamic for a number of groups so my new code is(not working): library(R2HTML) HTMLStart(outdir = file.path("C://Example_work","R_projects","Dynamic_creative"),filename = "RMDC_mockup",Title="Mock up for RMDC") for(group in 1:3){ paste("summary(z.out.", group, sep = "") paste("summary(s.out.", group, sep = "") paste("s.out.",group,"$qi$ev", sep = "") HTMLplot() } HTMLStop() Which returns the error Error in dev.print(device = png, file = AbsGraphFileName, width = Width, : no device to print from Can anyone offer some advise here? Mike [[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.