[R] How do people use Sweave / R / Databases

Seth Falcon seth at userprimary.net
Fri Jan 29 20:58:18 CET 2010


On 1/29/10 11:45 AM, Duncan Murdoch wrote:
> On 29/01/2010 2:28 PM, Paul wrote:
>> I'm currently using r scripts in sweave to grab some data via ODBC,
>> process it then generate some tables. I'd like to be able to give
>> someone the files and let them reproduce what I've done. Is there some
>> way to store the data that is gathered by ODBC so that the second
>> person can recreate the work without the database (apart from just
>> writing it to a file or into the document)
>
>
> What I've done in a case like that is to store the data in a .Rdata file
> using save(), then have the Sweave code call load() to load it at the
> beginning of the script.
> There's also the cacheSweave package (and I think another one whose name
> I can't remember) to cache the value of some code blocks; you might be
> able to bundle up the document with the cache to send to someone who
> doesn't want to re-run the retrieval code.

Another Sweave caching solutions is the "weaver" package.

source("http://bioconductor.org/biocLite.R")
biocLite("weaver")

+ seth

-- 
Seth Falcon | @sfalcon | http://userprimary.net/user



More information about the R-help mailing list