str_replace_na: Turn NA into "NA"

Description Usage Arguments Examples

Description

Turn NA into "NA"

Usage

1
str_replace_na(string, replacement = "NA")

Arguments

string

Input vector. Either a character vector, or something coercible to one.

replacement

A single string.

Examples

1
str_replace_na(c(NA, "abc", "def"))

Example output

[1] "NA"  "abc" "def"

stringr documentation built on May 2, 2019, 11:03 a.m.