Colorful Output in R Console
Typical saturday morning, so I make pain perdu from
this week’s bread leftovers to make up for the
FOMO related to the
hashtag on twitter.
As every year, ROpenSci’s unconf looks amazing, and it definitely looks like a lot went on if I believe the tweetstorm and various announcements. One particular tweet that caught my attention was this tweet about the available package.
Sounds like a nice implementation of a cool idea. But that’s not what woke me up, as
I already had seen mentions of
available. What surprised me was the use of color in the
rstudio console output. It could only mean one thing, rstudio now supports colored outputs
we this far could only used on capable terminals through the
crayon package, and indeed here’s the
relevant extract of the NEWS.md file
This is not a new interest to me, I played with color on the terminal back in
xterm256 package, at the time I used it to print a pixelized
version of the retro R logo and colors around France’s
“liberté, égalité, fraternité”.
but having this supported in rstudio is opening another kind of Pandora’s box. I feel like my parents when color first appeared on television.