Skip to content

Commit c9bc480

Browse files
authored
Merge pull request #98 from GlenHertz/main
Fix docs for `@slices_sample(5)`
2 parents 9a035d1 + 1efc08f commit c9bc480

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
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.

docs/examples/UserGuide/slice.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ end
9999

100100
@chain df begin
101101
@slice_head(n = 3)
102-
end
102+
end

src/docstrings.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,14 +1320,15 @@ julia> @semi_join(df1, df2, "a" = "a")
13201320

13211321
const docstring_pivot_wider =
13221322
"""
1323-
@pivot_wider(df, names_from, values_from)
1323+
@pivot_wider(df, names_from, values_from[, values_fill])
13241324
13251325
Reshapes the DataFrame to make it wider, increasing the number of columns and reducing the number of rows.
13261326
13271327
# Arguments
13281328
- `df`: A DataFrame.
13291329
- `names_from`: The name of the column to get the name of the output columns from.
13301330
- `values_from`: The name of the column to get the cell values from.
1331+
- `values_fill`: The value to replace a missing name/value combination (default is `missing`)
13311332
13321333
# Examples
13331334
```jldoctest
@@ -3409,4 +3410,4 @@ julia> @relocate(df, B:C) # bring columns to the front
34093410
4 │ 9 D 4 B 4 D
34103411
5 │ 10 E 5 C 5 E
34113412
```
3412-
"""
3413+
"""

0 commit comments

Comments
 (0)