Skip to content

Commit

Permalink
Merge branch 'main' into bump-version-requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke authored Dec 3, 2024
2 parents b40813c + 25f8ec4 commit 221a6a0
Show file tree
Hide file tree
Showing 57 changed files with 980 additions and 525 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: datawizard
Title: Easy Data Wrangling and Statistical Transformations
Version: 0.13.0.13
Version: 0.13.0.17
Authors@R: c(
person("Indrajeet", "Patil", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-1995-6531")),
Expand Down Expand Up @@ -33,7 +33,7 @@ BugReports: https://github.com/easystats/datawizard/issues
Depends:
R (>= 4.0)
Imports:
insight (>= 0.20.5),
insight (>= 1.0.0),
stats,
utils
Suggests:
Expand Down
25 changes: 20 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# datawizard (development)

BREAKING CHANGES
BREAKING CHANGES AND DEPRECATIONS

* Argument `drop_na` in `data_match()` is deprecated now. Please use
`remove_na` instead.

* Argument `drop_na` in `data_match()` is deprecated now. Please use `remove_na`
instead.
* In `data_rename()` (#567):
- argument `pattern` is deprecated. Use `select` instead.
- argument `safe` is deprecated. The function now errors when `select`
contains unknown column names.
- when `replacement` is `NULL`, an error is now thrown (previously, column
indices were used as new names).
- if `select` (previously `pattern`) is a named vector, then all elements
must be named, e.g. `c(length = "Sepal.Length", "Sepal.Width")` errors.

CHANGES

Expand All @@ -19,8 +28,14 @@ CHANGES
* `data_read()` no longer shows warning about forthcoming breaking changes
in upstream packages when reading `.RData` files.

* `data_modify()` now recognizes `n()`, for example to create an index for data groups
with `1:n()` (#535).
* `data_modify()` now recognizes `n()`, for example to create an index for data
groups with `1:n()` (#535).

* The `replacement` argument in `data_rename()` now supports glue-styled
tokens (#563).

* `data_summary()` also accepts the results of `bayestestR::ci()` as summary
function (#483).

BUG FIXES

Expand Down
12 changes: 10 additions & 2 deletions R/data_addprefix.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#' @rdname data_rename
#' Add a prefix or suffix to column names
#'
#' @rdname data_prefix_suffix
#' @inheritParams extract_column_names
#' @param pattern A character string, which will be added as prefix or suffix
#' to the column names.
#' @param ... Other arguments passed to or from other functions.
#'
#' @seealso
#' [data_rename()] for more fine-grained column renaming.
#' @examples
#' # Add prefix / suffix to all columns
#' head(data_addprefix(iris, "NEW_"))
Expand Down Expand Up @@ -29,7 +37,7 @@ data_addprefix <- function(data,
}


#' @rdname data_rename
#' @rdname data_prefix_suffix
#' @export
data_addsuffix <- function(data,
pattern,
Expand Down
Loading

0 comments on commit 221a6a0

Please sign in to comment.