[R] Using R2HTML

Pfaff, Bernhard Bernhard.Pfaff at drkw.com
Tue Apr 1 15:13:07 CEST 2003


Hello,
I'm using R2HTML library to make a HTML page output (both data frames and
graphics):

HTMLStart(outdir=paste(getwd(),"/prove html", sep = ""),filename="index",
echo = F, HTMLframe = T, withprompt = "HTML> ", CSSFile = "R2HTML.CSS",
Title = "Indici di attività")
...

barplot(tab41[,2],main="...",ylab="%",names.arg=rownames(tab41),cex.names=0.
7)
grid(nx=0,ny=NULL,lty=2)
barplot(tab41[,3],main="...",ylab="",names.arg=rownames(tab41),cex.names=0.7
)
grid(nx=0,ny=NULL,lty=2)
barplot(tab41[,4],main="...",ylab="giorni",names.arg=rownames(tab41),cex.nam
es=0.7)
grid(nx=0,ny=NULL,lty=2)

HTMLplot(Caption=paste("Indici di attività - centro
n.",cod.centro),GraphDirectory = get(".HTML.outdir", env = get("HTMLenv",
envir = .GlobalEnv)), GraphFileName = "ind-pos",Align = "center")

	But I get this error:

Error in dev.print(png, file = AbsGraphFileName, width = 400) :
	can only print from screen device
Execution halted

Can anyone help me?
Thanks

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Hello Gianluca,

save your graph as jpg-file first and then include it in your html-file
like:


HTMLInitFile(...)
.
.
.
HTML("<img src=\"Filename.jpg\" border=\"2\">")
.
.
.
HTMLEndFile()

HTH,
Bernhard


----------------------------------------------------------------------
If you have received this e-mail in error or wish to read our e-mail 
disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.
----------------------------------------------------------------------



More information about the R-help mailing list