distributing R package with optional S4 syntax sugar
Posted
by
mariotomo
on Stack Overflow
See other posts from Stack Overflow
or by mariotomo
Published on 2011-02-28T09:56:16Z
Indexed on
2011/02/28
15:24 UTC
Read the original article
Hit count: 267
I've written a small package for logging, I'm distributing it through r-forge, recently I received some very interesting feedback on how to make it easier to use, but this functionality is based on stuff (setRefClass
) that was added to R in 2.12.
I'd like to keep distributing the package also for R-2.9, so I'm looking for a way to include or exclude the S4 syntactical sugar automatically, and include it when the library is loaded on a R >= 2.12 system.
one other option I see, that is to write a small S4 package that needs 2.12, imports the simpler logging
package and exports the syntactically sugared interface... I don't like it too much, as I'd need to choose a different name for the S4 package.
© Stack Overflow or respective owner