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.11, 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.
thank you, Gabor, for offering a way to avoid this need but the question is still open.