How to write an if else block in R and how its different from ifelse and if_else (CC175)

January 3, 2022 • PD Schloss • 1 min read

An if else block is an effective tool for using conditional statements to control the flow of data through an R script. In this Code Club, Pat gives a tutorial on how to write blocks containing a single if statement, if else statements and if else if else statements. He’ll also demonstrate how this approach is different from using the ifelse and if_else functions. This is part of a series of videos demonstrating how to functions from base R to make these data compatible with tools from the tidyverse


You can browse the state of the repository at the