Skip to content

Commit

Permalink
Merge pull request #98 from GlenHertz/main
Browse files Browse the repository at this point in the history
Fix docs for `@slices_sample(5)`
  • Loading branch information
kdpsingh committed Jun 8, 2024
2 parents 9a035d1 + 1efc08f commit c9bc480
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/examples/UserGuide/conditionals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ end

# 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.

# 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.
# 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.

@chain df begin
@mutate(b = case_when(a >= 3 => 3,
Expand Down Expand Up @@ -72,4 +72,4 @@ end

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

# 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.
# 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.
2 changes: 1 addition & 1 deletion docs/examples/UserGuide/slice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ end

@chain df begin
@slice_head(n = 3)
end
end
5 changes: 3 additions & 2 deletions src/docstrings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1320,14 +1320,15 @@ julia> @semi_join(df1, df2, "a" = "a")

const docstring_pivot_wider =
"""
@pivot_wider(df, names_from, values_from)
@pivot_wider(df, names_from, values_from[, values_fill])
Reshapes the DataFrame to make it wider, increasing the number of columns and reducing the number of rows.
# Arguments
- `df`: A DataFrame.
- `names_from`: The name of the column to get the name of the output columns from.
- `values_from`: The name of the column to get the cell values from.
- `values_fill`: The value to replace a missing name/value combination (default is `missing`)
# Examples
```jldoctest
Expand Down Expand Up @@ -3409,4 +3410,4 @@ julia> @relocate(df, B:C) # bring columns to the front
4 │ 9 D 4 B 4 D
5 │ 10 E 5 C 5 E
```
"""
"""

2 comments on commit c9bc480

@kdpsingh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/108525

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.16.0 -m "<description of version>" c9bc480181d41d1673132c217a57e6abd0951587
git push origin v0.16.0

Please sign in to comment.