Hi Dieter,

There are two ways in R2HTML to work woth graphics.
- HTMLplot, that may require the interactive environment depending on how
you use it
- HTMLInsertGraph that is more suitable for batch scripting but requires
some more work.

First method:
HTMLplot and plotFunction (use print for trellis graphics). Not recommended.

Second method;
- Create the graphic in the format you need
- use HTMLInsertGraph to write HTML linking tag

Synopsis:

myGraphic <- file.path(outdir,"graph1.png")
png(file=myGraphic)
hist(rnorm(100))
dev.off()
HTMLInsertGraph("graph1.png",Caption="Graph1")

Do not hesitate to send me your file if more help is required

Best wishes,

Eric




2007/7/17, Dieter Vanderelst <d.vanderelst@tue.nl>:
>
> Hi All,
>
> I have an R script that spawns output in the form of an HTML page. This
> is done by the R2HTML package.
>
> Now I want to run the same script using Rcmd BATCH. However, it seems
> that it is not possible to use R2HTML in this case.
>
> My script ends with this error message:
> #########################
> Error in dev.print(png, file = AbsGraphFileName, width = Width, height =
> Height,  :
>
> can only print from screen device
>
> Execution halted
> #########################
>
> I can not find how to work around this problem in the R2HTML manual or
> the help archives.
>
> Has anybody done a similar thing before? Any suggestions?
>
> Greetings,
> Dieter
>
> --
> Dieter Vanderelst
> d.vanderelst@tue.nl
> Department of Industrial Design
> Designed Intelligence
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



-- 
Eric Lecoutre
Consultant - Business & Decision
Business Intelligence & Customer Intelligence

	[[alternative HTML version deleted]]

