Early in January this year, the curious Colin Fay discovered with great surprise that someone managed to insert Clippy (the classic Office Assistant) to the R help page of writexl::write_xlsx()
!
Well, whenever I see hacks that are funny or unbelievable, I’d first guess it would be either Jeroen Ooms or Romain Francois — who else could be more creative than them in the R community in terms of hacking skills? :) This time it was the ninja Jeroen. The key was to use \if{html}{}
to insert arbitrary HTML code to an R help page.
This morning I learned another amazing hack from Noam Ross, and the hack was even deeper and darker, which used \Sexpr{}
inside \if{html}{}
. He actually inserted an HTML widget (via DT) to an R help page!
- Update on 2018-08-01
-
I discovered yoni sidi’s
<details>
hack.