Blog Archives

Paper describing the weaver package published in Computational Statistics

June 14, 2008
By

It seems like a lifetime ago that I developed the weaver package for caching code chunks in Sweave documents. The paper that I presented at the DSC 2007 has finally been published in Computational Statistics. The title is Caching Code Chunks in Dynam...

Read more »

Paper describing the weaver package published in Computational Statistics

June 14, 2008
By

It seems like a lifetime ago that I developed the weaver package for caching code chunks in Sweave documents. The paper that I presented at the DSC 2007 has finally been published in Computational Statistics. The title is Caching Code Chunks in Dynamic Documents: The weaver package. Here’s the abstract: Authoring dynamic documents

Read more »

Testing for missing values of numeric (double) vectors in R

July 13, 2007
By

I just came across this bit of R trickiness when trying to improve the error messages for one of our packages. I tried adding a check at the C level for NA_REAL, but to no avail. The test failed even when I was certain that I was passing down a vecto...

Read more »

Testing for missing values of numeric (double) vectors in R

July 13, 2007
By

I just came across this bit of R trickiness when trying to improve the error messages for one of our packages. I tried adding a check at the C level for NA_REAL, but to no avail. The test failed even when I was certain that I was passing down a vector containing missing

Read more »

Yes, it can

August 2, 2006
By

Joel on Software’s latest post is about having first class functions in your programming language. He shows how you can use functions as arguments to functions to reduce code duplication. IReducing code duplication is a nice way to motivate languag...

Read more »

Yes, it can

August 2, 2006
By

Joel on Software’s latest post is about having first class functions in your programming language. He shows how you can use functions as arguments to functions to reduce code duplication. IReducing code duplication is a nice way to motivate language features since the process of removing duplication almost always results in improved code.

Read more »

Here’s an improved system.time function for R

May 14, 2006
By

R’s current system.time function doesn’t name the vector of return values. Doing so makes it easier to understand the output. IMO, the current code has two uglies: it sets an on.exit hook and then calls on.exit() explicitly. It also computes the ...

Read more »

Here’s an improved system.time function for R

May 14, 2006
By

R’s current system.time function doesn’t name the vector of return values. Doing so makes it easier to understand the output. IMO, the current code has two uglies: it sets an on.exit hook and then calls on.exit() explicitly. It also computes the elapsed time twice (once for the stdout message and once for the

Read more »

Aggregating Results from Unreliable Functions in R

May 12, 2006
By

I posted this as a response to a question on R-help. I think the idea of a “collect” function could be useful both in the context of unreliable functions that sometimes error out and also in filtering contexts where currently one creates a list co...

Read more »

Aggregating Results from Unreliable Functions in R

May 12, 2006
By

I posted this as a response to a question on R-help. I think the idea of a “collect” function could be useful both in the context of unreliable functions that sometimes error out and also in filtering contexts where currently one creates a list containing good elements and some sort of sentinel, usually NULL,

Read more »