Roger Peng's Software

A repository of notes for my software projects

New package cacheSweave

I've uploaded a new package to CRAN called cacheSeave for caching computations in Sweave.  One problem with Sweave is that everytime you edit a .Rnw file, you need to "recompile" the entire thing, even if the code didn't change.  If the code is stable, you might be better off caching the results of the computations and just loading them from the disk.   Using the cacheSweaveDriver() function as a Sweave driver, you can set "cache = true" in your Sweave code chunks and any objects created in that code chunk will be cached to a database.

The cacheSweave uses the stashR and filehash packages.  The cached computations are stored in a stashR databases and then lazy-loaded into the R workspace using the dbLazyLoad() function from filehash.

Using the cacheSweave package requires a little modification to the way .Rnw files are written.  For example, in order to make a plot, I usually have one code chunk for setting up the data and then another code chunk to do the plotting.  That way, all of the data for plotting can be cached separately and then in future runs all you need to do is the plotting.

February 18, 2007 in cacheSweave | Permalink

NMMAPSlite, stashR

Sandy Eckel and I have developed the stashR package for handling local and remote data repositories.  This package is now used by the NMMAPSlite package which provides remote access to all the NMMAPS data from the iHAPSS website.  Now, instead of downloading the entire NMMAPS database all at once, you can selectively download data from individual cities.

The NMMAPSlite package itself does not contain any data---you must be connected to the Internet to get the data. 

Both packages are on CRAN now.

February 17, 2007 in NMMAPSlite, stashR | Permalink

Updates to filehash, gpclib

Duncan Murdoch has generously contributed code to gpclib for handling tristrips.  This functionality had long been available in the GPC library but I had never written the R interface.  Version 1.4 of gpclib (on CRAN) includes the tristrip code.

Also, I've uploaded version 0.9-1 of filehash to CRAN.  This just fixes some of the dependencies in the NAMESPACE file (the normalizePath() function needed to be imported from 'utils').

February 17, 2007 in filehash, gpclib | Permalink

tlnise 0.2-4

I uploaded a new version of tlnise today.  This version fixes (I think) some warnings from the Fortran compiler that were making the package fail R CMD check.

September 21, 2006 in tlnise | Permalink

filehashSQLite, cacheSweave

Just posted 'filehashSQLite' and 'cacheSweave' packages to the software repository.  'filehashSQLite' implements filehash key-value databases using the SQLite database management system (via the 'RSQLite' package).  'cacheSweave' provides functions for caching computings when using Sweave by storing results in a filehash database.  This package is still experimental.

September 18, 2006 in filehash | Permalink

APHealth 0.4-4

The latest version of the APHealth (formerly APHealthTS) package is 0.4-4.  You can download a source package from my software repository.  No official release yet, just documenting the current version.

June 01, 2006 in APHealth | Permalink

filehash 0.6-3 on CRAN

I just uploaded version 0.6-3 of filehash on to CRAN.  As you can tell from the big jump in version number this is a major change from the previous version. 

There have been a number of changes under the hood.  For starters, the new default backend format is "DB1" which stores the data and index in a single file.  The old "DB" format is still available but users are discouraged from using it.  Also, the "DB" format uses different filenames from the previous version.  You can convert old "DB" databases using the supplied 'convertDB()' function.  The "RDS" format has not changed from before.

There is a mechanism in place now for developing new backend formats.  You can register a new format with the 'registerFormatDB()' function and 'filehashFormats()' returns a list of the available formats.  I've developed an SQLite backend format in a separate package that is still experimental and makes use of this registration mechanism.

There is also a short article about the package.

June 01, 2006 in filehash | Permalink

filehash 0.4-1

Version 0.4-1 of the filehash package is available and it has some changes to accomodate some the of changes made to serialize() for R 2.3.0.  The package now requires R 2.3.0 or higher.

  • Download filehash_0.4-1.tar.gz

The package should be on CRAN in a week or so.

April 18, 2006 in filehash | Permalink

gpclib 1.3-3 on CRAN

Version 1.3-3 of gpclib is on CRAN now.  The only change is that `area.poly' now returns 0 for polygons with no points.

March 07, 2006 in gpclib | Permalink

filehash 0.4 on CRAN

Version 0.4 of filehash has been uploaded to CRAN.  Thanks to Bill Venables and David Brahm for pointing out (and suggesting a solution for) a problem with the "RDS" type database on case-insensitive OSes.  I now use a name-mangling scheme for "RDS" databases so that objects with capital letters in their names get saved on the disk with mangled filenames.

There have been a number of other changes.  Here's the NEWS file:

Version 0.4

* Added name mangling scheme to prevent clobbering on case-insensitive OSes like Windows (thanks to Bill Venables and David Brahm)

* Added dumpImage, dumpObjects, dumpDF functions for dumping various things to filehash databases

* Added filehashOption() function for setting global options; right now only the default database type can be set

* dbLoad and db2env are regular functions now rather than generics/methods.  dbLoad's default 'env' is the parent frame now

* Added a "filehash" method for 'with'

* Added new generic dbUnlink which deletes a database from the disk

February 07, 2006 in filehash | Permalink

Next »

Categories

  • APHealth
  • cacheSweave
  • filehash
  • General
  • gpclib
  • NMMAPSdata
  • NMMAPSlite
  • ptproc
  • simpleboot
  • stashR
  • tlnise
  • tsModel

Business

  • About me
  • Curriculum vitae

Software Links

  • NMMAPSdata on iHAPSS
  • Department of Biostatistics
  • GNU General Public License
  • The Comprehensive R Archive Network
  • The R Project for Statistical Computing
  • Alan Murta's Public Software (gpc)

Archives

  • February 2007
  • September 2006
  • June 2006
  • April 2006
  • March 2006
  • February 2006
  • November 2005
  • October 2005
  • September 2005
  • August 2005

Recent Posts

  • New package cacheSweave
  • NMMAPSlite, stashR
  • Updates to filehash, gpclib
  • tlnise 0.2-4
  • filehashSQLite, cacheSweave
  • APHealth 0.4-4
  • filehash 0.6-3 on CRAN
  • filehash 0.4-1
  • gpclib 1.3-3 on CRAN
  • filehash 0.4 on CRAN
Subscribe to this blog's feed