[R-sig-DB] R DB interfaces and saving charts

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Sat Nov 27 17:23:54 CET 2010


On 27 November 2010 at 07:57, bill hastings wrote:
| Here are a few question I have. 
| Thanks, for any answers.
| 
| 1) Is there anyway to save a chart(produced by plot)
|     to a data base?
|     I see that most of the R DB methods
|     save output as data.frames or files.

Most R charts go to 'devices'; most of these devices can save to a file. You
can the serialize the file, or save the it as a blob.

So yes: you can render plenty of charts 'off-line' and then have, say, a web
frontend serve them.

Some R charting packages also generate object you could serialize
directly. My digest package is a useful interface for serializing /
deserialization.

| 2) If I can not use db's to save charts and graphics,
|    is there a way to save multiple charts in a file?
|    saving the charts as individual files will create
|   thousands of files. I would like to keep the file count down.

Sure. 

See e.g. help(pdf) and look at the onefile argument. [ The question is
kinds off-topic here as it has no bearing on DBs. ]
 
| 3)  I plan to use these charts in html web pages, does anyone
|     recommend any particular html editor to layout web pages
|     from R?

No idea. I like gWidgetsWWW for high-level interfaces from R to (simple
enough) web pages.  When I need to edit html, emacs is good enough with
suitable modes.
 
| 4) How can R's screen output be saved in a DB as html or xml
|    for use in web pages?

Huh? Who said the devices produce html?  People do weird things with XML.
And the XML package suppports so if you must wrap a binary blob (properly
serialized) in XML tags then go for it.
 
| 5) Are there any packages for capturing screen output for
|    entry into a db?

Question 5) is the same as question 1) so also see above.  Apart from that, R
is a programming language. When a function is missing, we tend to write it.
If you need other people to write it for you, there are consultants (and if
you contact me offline I even recommend one).

Dirk

-- 
Dirk Eddelbuettel | edd using debian.org | http://dirk.eddelbuettel.com




More information about the R-sig-DB mailing list