[R] reformatting R scripts for htmlize()

From: Agustin Lobo <aloboaleu_at_gmail.com>
Date: Wed, 18 Jun 2008 11:49:08 +0200


I have a bunch of (mainly class) R scripts that I would like to convert into html pages (although if someone thinks that what I want to do is easier with latex or pdf, please tell me).

Considering the format of my files, htmlize() seems the best option. The only problem is that I would need to write graphics to a file, thus
converting parts like:

plot(sel$hora, sel$COD_SP_C)
#and check the time intervals



png("1.png");plot(sel$hora, sel$COD_SP_C);dev.off()
#and check the time intervals


Any ideas on how to write an script (could be done in R itself?) that would automatically modify the current script into a "htmlize-friendly" script?

One problem is that while R accepts png() providing a default name for the png file, htmlize() fails unless a name is provided.



Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo_at_ija.csic.es

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 18 Jun 2008 - 13:59:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 20 Jun 2008 - 16:30:46 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive