str_invert_na: Invert 'NA' String Replacement

str_invert_naR Documentation

Invert NA String Replacement

Description

str_inv_replace_na() performs the inverse operation of str_replace_na(); that is, it converts replaced NA values back to NA_character_. This only works if NA is replaced with "NA" or a case-wise variant thereof (i.e. "Na", "na", or "nA"). It is designed to invert the addition of "_[0-9]" suffixes as well.

Usage

str_invert_na(string)

Arguments

string

A character vector

Value

The input string with NA replacements converted back to NA_character_


jesse-smith/coviData documentation built on Jan. 14, 2023, 11:08 a.m.