Getting Started with R
Getting Started with R – Download R & RStudio
Step-by-step process on how to download and setup R and RStudio. Includes options for Mac and PC and a walkthrough of RStudio’s grid.
Working with Dates in R
How to work with the %YM%m (2022M01) date format in R
How to convert %YM%m (ex: 2022M01, similar to yymm. in SAS) to a date format in R, and how to convert a standard date back to this format.
Convert dates from POSIXct to Date in R
This post will walk you through the steps to convert a variable of a datetime class like POSIXct to a date class in R.
Formatting Data in R
Remove decimal from column in R
To remove a decimal from a column or the entire data frame in R, we can use str_replace from the tidyverse.
Convert variable class by index in R
An overview and example of how to convert variable classes by index in R by using the mutate & across functions from dplyr.
Use double quotes within double quotes in R
This post outlines how to use double quotes within double quotes in R by using a backslash in front of each quote surrounding the text.
Transforming Data in R
The magic of paste0 & sqldf
Utilize the paste0 function to paste pre-set values into a string and then pass that string into a sqldf query.
Using SQL in R
Thanks to the sqldf package, using SQL in R to analyze & transform data is seamless. This post offers a tutorial & best practices.