R2HTML how to pair graphic.png and table
Eric, your code work well for my need, i'm not skillful in html environment, but your functions in R2HTML give simple many output requirements thanks Roberto
Eric Lecoutre wrote:
Hi Roberto,
here is a way that presumes you know some (basic) HTML tags:
library(R2HTML)
directory=getwd()
myfile<-file.path(directory,"testHTML.html")
HTMLoutput=file.path(directory,"testHTML.html")
graf="graf.png"
png(file.path(directory,graf))
plot(c(1:12))
dev.off()
tab<-as.matrix(c(1:12))
cat("<table border=0><td width=50%>",file=HTMLoutput, append=TRUE)
HTMLInsertGraph(graf,file=HTMLoutput,caption="Esempio di grafico")
cat("</td><td width=50%>",file=HTMLoutput, append=TRUE)
HTML(tab,file=HTMLoutput)
cat("</td></table>",file=HTMLoutput, append=TRUE)
browseURL(myfile)
I had already though I should include a function like layout for plots,
i will have a look at that when some time is available.
Best,
Eric
2007/12/6, Roberto Iacopetti <iacopetti at fastpiu.it>:
Dear list, i have this problem: how to pair a graphic.png and a table in R2HTML ? The better showing of a mutiple analysis is sometimes to mate graphic and table Can anyone help me in this task ?? In the example below graphisc and table are subsequent and not pair.. directory=getwd() myfile<-file.path(directory,"testHTML.html") HTMLoutput=file.path(directory,"testHTML.html") graf="graf.png" png(file.path(directory,graf)) plot(c(1:12)) dev.off() tab<-as.matrix(c(1:12)) HTMLInsertGraph(graf,tab,file=HTMLoutput,caption="Esempio di grafico") browseURL(myfile) Thanks in advance Roberto Iacopetti -- View this message in context: http://www.nabble.com/R2HTML--how-to-pair-graphic.png-and-table-tf4956321.html#a14193218 Sent from the R help mailing list archive at Nabble.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.
-- Eric Lecoutre Consultant - Business & Decision Business Intelligence & Customer Intelligence [[alternative HTML version deleted]]
______________________________________________ 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.
View this message in context: http://www.nabble.com/R2HTML--how-to-pair-graphic.png-and-table-tf4956321.html#a14194905 Sent from the R help mailing list archive at Nabble.com.