Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: remove broken $name$map's document #1123

Merged
merged 2 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- The `check_sorted` argument is removed from `$rolling()` and `$group_by_dynamic()`.
Sortedness is now verified in a quick manner, so this argument is no longer needed
(pola-rs/polars#16494).
- `$name$map()` stacks on Linux, so this method is deprecated and the document
is removed. Please use other methods including `$rename_with()` instead (#1123).
- As warned in v0.16.0, the order of arguments in `pl$Series` is changed (#1071).
The first argument is now `name`, and the second argument is `values`.
- `$to_struct()` on an Expr is removed. This method is now only available for
Expand Down
22 changes: 12 additions & 10 deletions R/expr__name.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ ExprName_keep = function() {
unwrap("in $name$keep():")
}

# TODO: this method is broken after <https://github.com/pola-rs/r-polars/pull/1104>, so not documented
#' @noRd
#' Map alias of expression with an R function
#'
#' Rename the output of an expression by mapping a function over the root name.
Expand All @@ -57,16 +59,16 @@ ExprName_keep = function() {
#' @return Expr
#'
#' @examples
#' # df = pl$DataFrame(var1 = 1:3, var2 = "a")
#' #
#' # df$select(
#' # pl$col("*")$name$map(\(x) paste0("new_", x))
#' # )
#' #
#' # # $alias() is not taken into account by $name$map()
#' # df$select(
#' # pl$col("var1")$alias("foobar")$name$map(\(x) paste0("new_", x))
#' # )
#' df = pl$DataFrame(var1 = 1:3, var2 = "a")
#'
#' df$select(
#' pl$col("*")$name$map(\(x) paste0("new_", x))
#' )
#'
#' # $alias() is not taken into account by $name$map()
#' df$select(
#' pl$col("var1")$alias("foobar")$name$map(\(x) paste0("new_", x))
#' )
ExprName_map = function(fun) {
if (
!polars_options()$no_messages &&
Expand Down
29 changes: 0 additions & 29 deletions man/ExprName_map.Rd

This file was deleted.

Loading