For happy-R blogging

[This article was first published on Fabio Marroni's Blog » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

You may notice that I don’t have that many posts on my blog, and they are all about R.
The paucity of my posts makes me a bit sad, but not much, really…
What makes (or better, used to make me) sad is that posts of R code (used to) look awful.
However, your code doesn’t deserve and doesn’t need to be ugly. You can find online several beautifiers.
This page on Inside-R provides a useful tool. You just need to paste your R code in the provided form and paste it back in your page. Nice thing is that you get back HTML code so you can paste it in your blog, but also in your web site. Drawback: you get back a nearly unintelligible page full of html formatting in which your code is lost; to change even a single letter of code you will probably have to go back to your original function. You probably don’t need to edit your code now, but I got nervous about this for some strange reason. Thus, I looked for additional tools. I found out that WordPress now enables R syntax highlighting. I can assure you that it’s fairly easy (I did it!). Instructions are available on this R-bloggers page.
Since when I tried these two tools, I am an happy-R blogger!


To leave a comment for the author, please follow the link and comment on their blog: Fabio Marroni's Blog » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)