Functions Are Objects

If you’ve used R for any length of time, you would have likely come across this statement; Functions are objects. I was reading the book Advanced R the other day and Hadley Wickham was saying it again. Then somehow it dawned on me that functions really are objects! So, what is an object in R? […]

Read More Functions Are Objects

Easily Replace Characters In A String

“Bulbs” by Duane Storey is licensed under CC BY-NC-ND 2.0 I just discovered a very useful function in the R base package that can be used to easily replace given characters within strings – chartr() (short for character translation) We then try inserting 2 characters replace a single character. The replacement is carried out as […]

Read More Easily Replace Characters In A String

Good morning or Happy New Year

I’ve been away from this page for a while and for good reason   I’ve been working on a small (or not so small) application that is built on C++. It was actually some sort of abandoned project, partly because I was busy learning stuff by the side – including more R. Okay I just admitted […]

Read More Good morning or Happy New Year

Automating my R workflow

David Hoffman 2012 In his book, R Packages, Hadley Wickham, a professor of statistics and foremost developer in the R community, wrote: “anything that can be automated, should be automated”. Though made in reference to package development in particular, this statement applies pretty much to other aspects of computing. When I started my journey in […]

Read More Automating my R workflow

An R package for writing websites

Documenting my R learning experience in a WordPress environment has been far from easy. I’m fact, it’s been quite cumbersome and counterintuitive. For instance, getting the code snippets to look just right is a herculean task, and generating reproducible output is not supported (I think). Thankfully I discovered blogdown, a package written by Yihui Xie, […]

Read More An R package for writing websites