Publications by Steven P. Sanderson II, MPH

grep() vs. grepl() in R

19.08.2024

Introduction Hey there, useR’s! Today, we’re going to talk about two super useful functions in R: grep() and grepl(). These functions might sound similar, but they have some key differences that are important to understand. Let’s break it down in a way that’s easy to grasp, even if you’re new to R programming. What are grep() and grepl()...

2824 sym R (565 sym/3 pcs)

Your First C Adventure: Hello World in VS Code

18.08.2024

Introduction Hey there, budding C programmer! Ready to embark on your coding journey? Let’s start with the classic “Hello World” program using Visual Studio Code. Don’t worry if you’re new to this – we’ll walk through it step by step! Setting Up VS Code for C Great job on setting up VS Code using the instructions from the official do...

3103 sym R (104 sym/1 pcs) 2 img

Mastering grepl with Multiple Patterns in Base R

15.08.2024

Introduction Hello, fellow useRs! Today, we’re going to expand on previous uses of the grepl() function where we looked for a single pattern and move onto to a search for multiple patterns within strings. Whether you’re cleaning data, conducting text analysis, grepl can be your go-to tool. Let’s break down the syntax, offer a practical exampl...

2523 sym R (595 sym/3 pcs)

Mastering Matrix Concatenation in R: A Guide to rbind() and cbind()

14.08.2024

Introduction Hello, fellow useRs! Today, we’re going to discuss the art of concatenating matrices in R. Concatenating matrices is all about combining smaller pieces into a larger whole, and in R, the functions rbind() and cbind() are your go-to tools for this task. Whether you’re aligning matrices by rows or columns, these functions are efficie...

3099 sym R (1314 sym/16 pcs)

Opening an Excel Workbook with VBA and Calling it from R

13.08.2024

Introduction In this post, we’ll cover how to open an Excel workbook using VBA and then call this VBA code from R. This guide will help you automate tasks in Excel directly from R, combining the strengths of both tools. We’ll break down the VBA code and the R script step by step to make the process clear and easy to follow. Step 1: Writing the...

4042 sym R (685 sym/2 pcs) 1 img

Mastering String Concatenation of Vectors in R: Base R, stringr, stringi, and glue

12.08.2024

Introduction Welcome to another exciting R programming tutorial! Today, we will explore how to concatenate vectors of strings using different methods in R: base R, stringr, stringi, and glue. We’ll use a practical example involving a data frame with names, job titles, and salaries. By the end of this post, you’ll feel confident using these tool...

3215 sym R (2155 sym/15 pcs)

Mastering String Concatenation in R: A Comprehensive Guide

11.08.2024

Introduction String concatenation is a fundamental operation in data manipulation and cleaning. If you are working in R, mastering string concatenation will significantly enhance your data processing capabilities. This blog post will cover different ways to concatenate strings using base R, the stringr, stringi, and glue packages. Let’s go! Conc...

3431 sym R (996 sym/16 pcs)

Mastering Character Counting in R: Base R, stringr, and stringi

08.08.2024

Introduction Counting the occurrences of a specific character within a string is a common task in data processing and text manipulation. Whether you’re working with base R or leveraging the power of packages like stringr or stringi, R provides efficient ways to accomplish this. In this post, we’ll explore how to do this using three different me...

2836 sym R (555 sym/6 pcs)

How to Check if a String Contains Specific Characters in R: A Comprehensive Guide with Base R, string & stringi

07.08.2024

Introduction Welcome to another exciting blog post where we walk into the world of R programming. Today, we’re going to explore how to check if a string contains specific characters using three different approaches: base R, stringr, and stringi. Whether you’re a beginner or an experienced R user, this guide will should be of some use and provid...

3246 sym R (581 sym/9 pcs)

Checking If a Workbook is Open Using VBA and Executing from R

06.08.2024

Introduction In the world of data analysis and automation, Excel and R are powerful tools that can work in tandem to streamline workflows. One common task is to check if a specific Excel workbook is open. This can be done using VBA (Visual Basic for Applications) and executed from R, creating a seamless bridge between these two platforms. In this b...

2651 sym R (1077 sym/3 pcs) 6 img