Find nth largest or smallest in a group
You want to identify the nth largest or smallest item in a group using R. For example, to filter out the two rows in the table below: Any time there …
You want to identify the nth largest or smallest item in a group using R. For example, to filter out the two rows in the table below: Any time there …
You want to calculate percent of column in R as shown in this example, or as you would in a PivotTable: Here are two ways: (1) using Base R, (2) …
MID(), LEFT() and RIGHT() make it easy to extract parts of strings in Excel. Let’s see how we apply those in R. Using substr() Let’s start with a simple example …
Below is a short list of basic, commonly-used Excel formulas and their R counterparts. The R functions are part of Base R, in that they do no require third-party packages. …
This is not an Excel feature, although it should be! Often times we have a list of things in a column that needs to be combined into, say, a comma-delimited …
VLOOKUP is usually the first magical formula people learn when learning Excel. The magic never goes away. So let’s see how to do a VLOOKUP in R. Situation Let’s say …
The Excel PivotTable is plain awesome. In this post I will show you how to make a PivotTable in R (kind of). We will use two popular libraries, dplyr and …
Believe it or not, Excel is still my go-to analysis tool a lot of times, because it’s great at what it does. I’m a shortcut fiend, so I can do …