Learn to Code in R

Your home for step-by-step guides on how to code in R. Everything from the basics to the most advanced topics will be covered here.

Written by Daniel D. Bonneau

Reshape Wide to Long in R

If a category is spread across multiple columns, we can reshape those columns from long to wide with one simple function.

By Daniel D. Bonneau in R Basics

July 4, 2022

Sort Dataframe by Column in R

Sorting data frames can help you get a better idea of your data. I’ll show you one way using dplyr’s arrange to do just that.

By Daniel D. Bonneau in R Basics

June 25, 2022

Convert Revenue Data to Numeric

Revenue data often comes with dollar signs and commas. In this article, I’ll show you how to remove characters so we can convert that raw data into a numeric value.

By Daniel D. Bonneau in R Basics

June 24, 2022

Convert to Date in R

Using the handy lubridate package, we can convert values R reads in as Characters to Date’s.

By Daniel D. Bonneau in R Basics

June 23, 2022

R Load CSV

Using two methods, base R and the readr package, we can read in our csv files with little effort!

By Daniel D. Bonneau in R Basics

June 22, 2022