File: deprecated.R

package info (click to toggle)
r-cran-skimr 2.1.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,188 kB
  • sloc: sh: 13; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#' Deprecated functions from skimr v1
#'
#' Skimr used to offer functions that combined skimming with a secondary effect,
#' like reshaping the data, building a list or printing the results. Some of
#' these behaviors are no longer necessary. [skim()] always returns a wide
#' data frame. Others have been replaced by functions that do a single thing.
#' [partition()] creates a list-like object from a skimmed data frame.
#'
#' @param .data A tibble, or an object that can be coerced into a tibble.
#' @param ...  Columns to select for skimming. When none are provided, the
#'   default is to skim all columns.
#' @return Either A `skim_df` or a `skim_list` object.
#' @name deprecated-v1
NULL

#' @describeIn deprecated-v1 [skim()] always produces a wide data frame.
#' @export
skim_to_wide <- function(.data, ...) {
  .Deprecated("skim()")
  skim(.data, ...)
}

#' @describeIn deprecated-v1 [partition()] creates a list.
#' @export
skim_to_list <- function(.data, ...) {
  .Deprecated("partition(skim())")
  skim(.data, ...) %>% partition()
}

#' @describeIn deprecated-v1 [print()] and [skim_with()] set options.
#' @export
skim_format <- function(...) {
  .Deprecated(
    "print()",
    msg = paste(
      "Formatting options are now in print() or as function",
      "arguments in skim_with()."
    )
  )
}