Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

convert_to_NA

Convert string values to true NA values.


Description

Converts instances of user-specified strings into NA. Can operate on either a single vector or an entire data.frame.

Usage

convert_to_NA(dat, strings)

Arguments

dat

vector or data.frame to operate on.

strings

character vector of strings to convert.

Value

Returns a cleaned object. Can be a vector, data.frame, or tibble::tbl_df depending on the provided input.

Warning

Deprecated, do not use in new code. Use dplyr::na_if() instead.

See Also

janitor_deprecated


janitor

Simple Tools for Examining and Cleaning Dirty Data

v2.1.0
MIT + file LICENSE
Authors
Sam Firke [aut, cre], Bill Denney [ctb], Chris Haid [ctb], Ryan Knight [ctb], Malte Grosser [ctb], Jonathan Zadra [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.