find.numeric: Identify numeric values from a character vector

Description Usage Arguments Value

View source: R/clean_functions.R

Description

Identify all numbers from a character vector (e.g. ID variables). Can return indices of these numbers, their values, or boolean indicators for whether each value is numeric.

Usage

1
find.numeric(x, response = c("index", "value", "boolean"))

Arguments

x

A character vector containing possible numeric values that need identified.

response

The type of values to be returned. One of "index" (default), "value", or "boolean".

Value

If response == "index", the indices of all numeric values. If response == "value", the values of these numeric values, with non-numeric values replaced by NA. If response == "boolean", boolean indicators for whether each value in x is numeric or string.


mdtrinh/vietnamdata documentation built on May 3, 2019, 11:49 p.m.