File: dep-extract.R

package info (click to toggle)
r-cran-tidyr 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,720 kB
  • sloc: cpp: 268; sh: 9; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# nocov start

#' Extract numeric component of variable.
#'
#' DEPRECATED: please use `readr::parse_number()` instead.
#'
#' @param x A character vector (or a factor).
#' @keywords internal
#' @export
extract_numeric <- function(x) {
  message("extract_numeric() is deprecated: please use readr::parse_number() instead")
  as.numeric(gsub("[^0-9.-]+", "", as.character(x)))
}

# nocov end