Skip to content

Commit 9464368

Browse files
GlenHertzkdpsingh
authored andcommitted
Fix typo in conditionals.jl docs
1 parent 7203e0c commit 9464368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/examples/UserGuide/conditionals.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434

3535
# Although `if_else()` is convenient when evaluating a single condition, it can be cumbersome when evaluating multiple conditions because subsequent conditions need to be nested within the `no` condition for the preceding argument. For situations where multiple conditions need to be evaluated, `case_when()` is more convenient.
3636

37-
# Let's first consider a similar example from above and recreate it using `case_when()`. The following code creates a column `b` that assigns a value if 3 if `a >= 3` and otherwise leaves the value unchanged.
37+
# Let's first consider a similar example from above and recreate it using `case_when()`. The following code creates a column `b` that assigns a value of 3 if `a >= 3` and otherwise leaves the value unchanged.
3838

3939
@chain df begin
4040
@mutate(b = case_when(a >= 3 => 3,
@@ -72,4 +72,4 @@ end
7272

7373
# ## Do these functions work outside of TidierData.jl?
7474

75-
# Yes, both `if_else()` and `case_when()` work outside of TidierData.jl. However, you'll need to remember that if working with vectors, both the functions and conditions will need to be vectorized, and in the case of `case_when()`, the `=>` will need to be written as `.=>`. The reason this is not needed when using these functions inside of TidierData.jl is because they are auto-vectorized.
75+
# Yes, both `if_else()` and `case_when()` work outside of TidierData.jl. However, you'll need to remember that if working with vectors, both the functions and conditions will need to be vectorized, and in the case of `case_when()`, the `=>` will need to be written as `.=>`. The reason this is not needed when using these functions inside of TidierData.jl is because they are auto-vectorized.

0 commit comments

Comments
 (0)