The problem is probably due to what is considered a top level expression to be
evaluated and how R2HTML processes these.
A simpler alternative is to use txtStart() or etxtStart() from the TeachingDemos
package. These work similar to HTMLStart(), but don't do the html markup
(the etxt version does a little bit of markup, but you need to postprocess the
file with enscript).
These functions being simpler handle the output in a different way and a quick
test shows that the loop you show below does work with these.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Werner Wernersen
> Sent: Tuesday, September 23, 2008 11:05 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] R2HTML: output from for-loops
>
> Hi,
>
> I am trying to prepare a report with R2HTML using
> HTMLStart(outdir="./html", filename="report", echo=T,
HTMLframe=F)
>
> then, for instance, I want to get the output of a loop:
> for (i in 1:20) print(summary(rnorm(1000)))
>
> but only the first of summaries really ends up in the html file.
> What am I doing wrongly?
>
> Thanks,
> Werner
>
>
> __________________________________________________
> Do You Yahoo!?
> Sie sin
> Massenmails.
> http://mail.yahoo.com
>
> ______________________________________________
> R-help at 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.