I’ve just released two new packages for R: log4r and SortableHTMLTables. log4r is a minimal logging utility for R that’s inspired by the log4j family of logging tools. It has substantially fewer features than other logging tools for R, but it’s hopefully easier to use. SortableHTMLTables uses brew and the jQuery Tablesorter plugin to provide a function that dumps a data frame out to an HTML document containing a sortable table. You can see an example of the output here. Both packages were submitted to CRAN today and should reach the mirrors over the next few days.
John,
The SortableHTMLTables outputs looks cool, thanks.
The log4r also, is it intended for S4 objects? (I am asking since I don’t know what object oriented implementation in R you are using)
SortableHTMLTables does not seem to understand factors? Thanks for this package anyway!
#species varibale is converted to numeric?
sortable.html.table(iris, “iris.html”, “iris”)
@Tal, log4r uses S3 objects. I’ve never tried to use S4 objects as they seemed a bit complex, and Hadley discouraged their use when I asked the community about their usefulness. That said, I hope that the implementation doesn’t affect you as an end-user: you should be able to write out logging messages for any object you’ve generated to the log4r output files.
@jrara, I will look into the bug you found. Thanks for pointing it out.
@jrara The bug you pointed out is now fixed. brew rendered the factors as numbers by default, so I’ve simply added a call to as.character() in the HTML template.
You mentioned “other logging tools for R”? What are they? I didn’t know there are other logging tools for R. log4r is a pioneer as far as I know. I would appreciate to know other logging packages. Apologize if I mis-understand your words, and thanks a lot for your great work! I found your package and was using it before you upload to CRAN. It works very well for me so far.
@Branson, there is a package called ‘logging’ that you could use:
http://cran.r-project.org/web/packages/logging/index.html
Also, according to this page,
http://stackoverflow.com/questions/1928332/is-there-in-r-any-standard-logging-package
Shane Conway wrote a logging tool that wraps the real log4j library. I’m not sure if it was ever released, but it would be another logging package released earlier.
I’m glad log4r is working for you. Do let me know if you have any suggestions or encounter any bugs.