From 50f061228f2574b22546042ab47aea082414da63 Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Sun, 16 Apr 2023 16:06:22 +0200 Subject: [PATCH] Typo chap13 (#1424) --- logicals.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logicals.qmd b/logicals.qmd index 5e7d401..8dbbe03 100644 --- a/logicals.qmd +++ b/logicals.qmd @@ -421,7 +421,7 @@ If you want to use one value when a condition is `TRUE` and another value when i You'll always use the first three argument of `if_else()`. The first argument, `condition`, is a logical vector, the second, `true`, gives the output when the condition is true, and the third, `false`, gives the output if the condition is false. [^logicals-4]: dplyr's `if_else()` is very similar to base R's `ifelse()`. - There are two main advantages of `if_else()`over `ifelse()`: you can choose what should happen to missing values, and `if_else()` is much more likely to give you a meaningful error if you variables have incompatible types. + There are two main advantages of `if_else()`over `ifelse()`: you can choose what should happen to missing values, and `if_else()` is much more likely to give you a meaningful error if your variables have incompatible types. Let's begin with a simple example of labeling a numeric vector as either "+ve" or "-ve":