na_to_miss: na to miss format function

View source: R/format.R

na_to_missR Documentation

na to miss format function

Description

converts na values in vector to "Missing" or any other value. if the variable is a factor then the value is added as a factor level. if 'missing' already exists as a factor level then it simply adds more 'missing'.

Usage

na_to_miss(x, fill = "Missing", na_null = "na")

Arguments

x

vector containing the na values

fill

character or numeric value to replace na with. default is 'Missing'.

na_null

string determining what type of value to replace (i.e. na, null, nan). Options are "na", "null", and "nan", any other value will replace all of these. default is "na".

Examples

na_to_miss_function()

clmacleod/highlandr documentation built on Oct. 11, 2023, 8:04 p.m.