Blog Archives

Tips on non-standard evaluation in R

December 2, 2014
By

One of my favorite features of R is its meta-programming facilities. It can be simply demonstrated by the following examples. An ordinary use of R is to do statistical computing. We can evaluate something like sin(0) 0 Meta-programming in R allows users to manipulate the expression to evaluate. We can use quote to create an object that represents a function call. quote(sin(0)) sin(0) In...

Read more »

pipeR tutorial is released

September 21, 2014
By

Twelve days after the initial commit, pipeR tutorial is released! If you want to write R code fluently and process data elegantly, I strongly recommend that you read this tutorial which is designed to serve as a complete guide to pipeR package, inclu...

Read more »

More operators or more syntax?

August 22, 2014
By

The motivation of pipeline operator is to make code more readable. In many cases, it indeed better organizes code so that the logic is presented in human-readable fluent style. In other cases, however, such operators can make things worse. Recently, I had an interesting discussion on how to add side effect piping to pipeR functionality (in this issue), just...

Read more »

Easier way to chain commands using Pipe function

August 15, 2014
By

In pipeR 0.4 version, one of the new features is Pipe() function. The function basically creates a Pipe object that allows command chaining with $, and thus makes it easier to perform operations in pipeline without any external operator. In this post, I will introduce how to use this function and some basic knowledge about how it works. But before...

Read more »

Difference between magrittr and pipeR

August 7, 2014
By

(This post is rewritten to adapt to the latest release of pipeR) Pipeline is receiving increasing attention in R community these days. It is hard to tell when it begins but more people start to use it since the easy-and-fast dplyr package imports the magic operator %>% from magrittr, the pioneer package of pipeline operators for R. The two...

Read more »

A quiz on magrittr: How many scores can you get?

August 6, 2014
By

Here is a quiz on magrittr and you may check if you are really good at using it. Since the CRAN version currently does not support nested ., it won't be interesting to make a quiz on that version. All the following examples are using the latest development version on GitHub. You can do the same test with...

Read more »

Introducing rlist 0.3

August 5, 2014
By

rlist 0.3 is released! This package now provides a wide range of functions for dealing with list objects. It can be especially useful when they are used to store non-tabular data. Two notable features are added in this version. First, list.search and equal() are added in support of fuzzy filtering and searching. Second, List object is added to provide object-based,...

Read more »

Introducing pipeR 0.4

August 3, 2014
By

pipeR 0.4 is released! Check it out at the project page. In this new version, two things happen. First, %>>% handles everything. Second, the introduction of Pipe object. %>>% In version 0.4, I decide to merge the functionality of all three operators in the previous versions. Only %>>% operator remains, and the two other operators are deprecated. But to make...

Read more »

Scraping information of CRAN packages

July 28, 2014
By

(This article is adapted to the latest version of rvest package.) In my previous post, I demonstrated how we can scrape online data using existing packages. In this post, I will take it a bit further: I will scrape more information of CRAN packages since each of them also has a web page like this. More specifically,...

Read more »

What are the most popular keywords of CRAN packages?

July 24, 2014
By

(This article is adapted to the latest version of rvest package.) A large proportion of R's power should be attributed to the enormous amount of extension packages. Many packages are published to CRAN. These packages cover a wide range of fields. In this post, I'll show you how to use R to scrap the titles of all CRAN packages from...

Read more »

Sponsors

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)