Learning to Use Vim

Even though vim has been my default text editor for a couple of years now, I’m still woefully ignorant about how to actually use it. Because 95% of my coding time is spent in RStudio, I really only use vim to briefly edit some bash scripts and therefore my unfamiliarity with it isn’t an urgent issue. Nonetheless, I tried to rectify this shortcoming a few months ago by changing my RStudio settings to “vim mode” and forcing myself to use vim commands all the time.

My Preliminary Oral Exam

In my PhD program, we are required to take a “preliminary oral exam.” It’s the second major hurdle to getting your PhD, the first being the written comprehensive exam and the last being the thesis defense, and it typically takes place during your third year. The structure of the oral exam is the following. First, I was asked to leave the room for a few minutes as the committee members decide what order they’re going to ask questions and other logistics.

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.