Debian Codegraph @

R/deprecated.R

raw
1 #' Deprecated functions from skimr v1
2 #'
3 #' Skimr used to offer functions that combined skimming with a secondary effect,
4 #' like reshaping the data, building a list or printing the results. Some of
5 #' these behaviors are no longer necessary. [skim()] always returns a wide
6 #' data frame. Others have been replaced by functions that do a single thing.
7 #' [partition()] creates a list-like object from a skimmed data frame.
8 #'
9 #' @param .data A tibble, or an object that can be coerced into a tibble.
10 #' @param ... Columns to select for skimming. When none are provided, the
11 #' default is to skim all columns.
12 #' @return Either A `skim_df` or a `skim_list` object.
13 #' @name deprecated-v1
14 NULL
15
16 #' @describeIn deprecated-v1 [skim()] always produces a wide data frame.
17 #' @export
18 skim_to_wide <- function(.data, ...) {
19 .Deprecated("skim()")
20 skim(.data, ...)
21 }
22
23 #' @describeIn deprecated-v1 [partition()] creates a list.
24 #' @export
25 skim_to_list <- function(.data, ...) {
26 .Deprecated("partition(skim())")
27 skim(.data, ...) |> partition()
28 }
29
30 #' @describeIn deprecated-v1 [print()] and [skim_with()] set options.
31 #' @export
32 skim_format <- function(...) {
33 .Deprecated(
34 "print()",
35 msg = paste(
36 "Formatting options are now in print() or as function",
37 "arguments in skim_with()."
38 )
39 )
40 }