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

str_replace_na

Turn NA into "NA"


Description

Turn NA into "NA"

Usage

str_replace_na(string, replacement = "NA")

Arguments

string

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

replacement

A single string.

Examples

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

stringr

Simple, Consistent Wrappers for Common String Operations

v1.4.0
GPL-2 | file LICENSE
Authors
Hadley Wickham [aut, cre, cph], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

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