### The 12 R functions of Xmas pt4/6

Wow, we’re already up to part 4 of this little series! If you want to go back and see where we started, check out this post. Today’s two (mostly pointless) R functions are evolutions of things we seen before. In the first we have more URL manipulation and in the second, more fun with sample(). Simple tweet In the 2nd installment we wrote a small function to launch a gif search on Giphy.

### The 12 R functions of Xmas pt3/6

Now that we’re at day three, you hopefully know the drill (if not, check out the first of these posts). I wrote 12 small and simple R functions, basically just for a bit of fun and I’m sharing them here to spread the fun around a little. Today’s functions are a number guessing game that reads user input and a function that tries to make us feel like we’ve been sucked into a retro sci-fi movie!

### The 12 R functions of Xmas pt2/6

{width=100%} Yesterday I posted the first two of the 12 small and hopefully fun R functions that I challenged myself to write last weekend. If you read that post, you’ll already get the idea. They’re small and fun functions that also do something small and fun! I wanted to stick to no more than a single function (though I may have cheated a bit in at least one of them) in order to ensure that the scope stayed small and I didn’t distract myself with too many unnecessary features.

### The 12 R functions of Xmas

For the other posts in this series check out the following links: Part 1 - barcode_game and days_until_xmas (This post) Part 2 - giphy_search and roll_dice Part 3 - what_number and sci-fi_terminal Part 4 - simple_tweet and magic_R_ball Part 5 - rot13 and awesome_blogdown Part 6 - sleigh_or_iss, twelve_days and unwrap_package A couple of weeks ago I tweeted about coding as a form of procrastination. It’s something I do quite a bit, but I also do something far more annoying that keeps me from coding altogether.

### Adding a package to RStudio Package Manager from R

Update (2018-12-8): I completely forgot to point out in the original post that RSPM can be used to publish rpackages directly from a git repo. This is a brilliant solution for continuous deployment type scenarios. Check the docs for more information! If you’ve read any of my previous posts you’ll know I’m a big fan of RStudio Package Manager (RSPM). It’s a great tool for enterprise users of R to take control of the way they distribute R packages within their organisation.

### Getting stringi to work with RStudio Connect

If you’re working with R in a Red Hat Linux based environment with no access to the internet and need to install the stringi package you’ll no doubt run into issues with ICU library that it relies on. At the time of writing, stringi (1.2.4) relies on libicu (called ‘libicu-devel’ on Red Hat based systems). Red Hat 7.5 only has libicu-devel version 50 and stringi needs 52 or higher. During installation, if it can’t find the version it needs, it tries to download a version it can compile against from the internet.

### Writing a git pre-commit hook in R

What are git hooks? From githooks.com Git hooks are scripts that Git executes before or after events such as: commit, push, and receive. Git hooks are a built-in feature - no need to download anything. They’re basically bits of code that are triggered by a particular git event. The code can do anything you like. For instance you could use the ‘pre-push’ hook to trigger some code immediately prior to a git push.

### Learn to write command line utilities in Python

If you read my series of posts on writing command line utilities in R, but were wondering how to do the same thing in Python, you’ve come to the right place. I learned a lot with that original series of posts though, so this time we’re going to switch things up a bit, dive right into a complete working example, and cover it all off in a single post. So let’s roll up our sleeves and get started!

### R in Prod: rip, a command line R package installer

If you’re responsible for the administration of R environments, you may have wished for an R equivalent of python’s pip tool for installing packages from the command line. R was originally designed to be more of an interactive user environment. This means things exist first and foremost within R itself, including the package installation function, install.packages(). More recently – and particularly since its usage has exploded – R’s user-base and the types of usage have diversified immensely.

### New from RStudio: Package Manager

The post originally appeared on the Mango Solutions blog. One of the few remaining hurdles when working with R in the enterprise is consistent access to CRAN. Often desktop class systems will have unrestricted access while server systems might not have any access at all. This inconsistency often stems from security concerns about allowing servers access to the internet. There have been many different approaches to solving this problem, with some organisations reluctantly allowing outbound access to CRAN, some rolling their own internal CRAN-like repositories, and others installing a fixed set of packages and leaving it at that.