Introduction to Regular Expressions (regex) in R

If you haven’t used regular expressions (regex) before, they are basically a way to write search patterns for strings. I’ve always found them to be inscrutable and unintuitive, so even though the search pattern I have in mind is usually very simple and should, in theory, require only a basic regex, I always have to Google what the correct syntax is. Today, I’m going to try to solve this problem by writing my own guide to regex.

Creating Your First R Package

There are already a lot of great resources1 that teach you how to make an R package. But I thought it would still be worthwhile to walk through how I created my first one – at the very least, it’ll be helpful for myself when I write my next R package. Here is my step-by-step guide to building a (minimally functional) R package. Step 1: Set up your packages and directory To create your own R package, you will need to use two packages, devtools and roxygen2.

Getting Started with R Markdown

I often use R Markdown for my research projects or any kind of data analysis (if you’re familiar with Python, they are similar to Jupyter notebooks). There are many advantages to using R Markdown over writing R scripts. One of the major ones is the ease with which it allows me to turn my work into something presentable for my advisor or other collaborators. By using R Markdown, I don’t have to track down a bunch of plots and files or really do any additional work to organize them.

My First JSM

Last week, I attended JSM (Joint Statistical Meetings) in Denver. It was my first conference ever, so I made sure to record down my thoughts. Since I wasn’t presenting at this conference, I had the luxury of being able to attend sessions without feeling anxious. And that was really great because I think getting to see what conferences are like before I present at one makes it less intimidating.

5 R Packages to Simplify Your Data Science Workflow

I just finished my second year in the PhD program, which means 2 years of writing a lot of R code. Today, I wanted to share some useful (and perhaps lesser known) R packages that I use. pacman for loading packages This package contains an awesome function called p_load. I prefer the concise way it lets you load packages, as opposed to writing library(package) over and over again.