plyr and dplyr: Data Manipulation in R

The purpose of the plyr and dplyr libraries in R is to manipulate data with ease.

As we’ve seen in a previous post, there are various methods of wrangling and summarising data in R. However, wouldn’t it be great if we had some libraries that can greatly simplify this process for us?

Continue reading “plyr and dplyr: Data Manipulation in R”

Creating functions and using lapply in R

Functions are used to simplify a series of calculations.

For instance, let us suppose that there exists an array of numbers which we wish to add to another variable. Instead of carrying out separate calculations for each number in the array, it would be much easier to simply create a function that does this for us automatically.

Continue reading “Creating functions and using lapply in R”