tags:

views:

247

answers:

4

not only is googling R so terribly difficult, log4r has also been taken for Ruby!

I am looking for the standard (if any) logging package for R. and some sample usage?

I also don't see it in http://cran.r-project.org/web/packages/


(late edit: it is now at its place on CRAN and there's a R-Forge page for it.)

+1  A: 

I'm not aware of any, so I was about to release a wrapper for log4j in the next few days (I've been testing it for a while now). I'll let you know when it's available.

Shane
a "wrapper"? in the sense that it links to the .jar? I'm curious about the possibility!
mariotomo
That's right. It uses rJava: http://www.rforge.net/rJava/
Shane
saw rJava, looks good! but back to the wrapper, if you plan to make it GPL, you could also share it while it's not yet ready, so we can work on it concurrently.
mariotomo
Mariotomo: Sorry for the delay with this. I'll post it on Google code so that you can build from it. It's the documentation that always kills me in trying to post to CRAN.
Shane
very late reply: why not on r-forge? I might find the time to help documenting and avoiding R CMD check errors and warnings. after that, posting to CRAN is just 3 clicks away.
mariotomo
+1  A: 

I found that RSeek is useful for searching for things related to R. It uses Google on the back-end. Unfortunately, I didn't really find much related to logging. But just for future reference...

Dr. Watson
+2  A: 

The in-built (package base) functions are "warning", "message", "stop". These functions support multiple languages. If you want to log to a file, maybe you could use these functions together with "sink".

Searching with RSeek brought up the package futile with a logger functionality.

Karsten W.
_futile_ looks interesting. If I understood correctly, it doesn't (yet) implement the whole structure logger/handler as in Python and Java.
mariotomo
I have been in contact with the author of the futile library. we might come out with a candidate logging functionality, either as part of futile or as a new package.
mariotomo
+4  A: 

I just submitted a 'logging' package to CRAN. it is based on some parts of an older version of the 'futile' package (by Brian Lee Yung Rowe).

you find the logging package:

it mimics the standard python logging package, but please be careful if you decide to use it. I also attempted to document it by example, the package home page on R-Forge points to a couple of possible usage sessions.

any feedback will be read with interest!

mariotomo
Nice job! +1 for really answering your own question.
Shane