Answers for "replace character with na r"

R
0

replace character with na r

# dplyr has the na_if() function 
library(dplyr)
x = c("a", "b", "c", "d")
na_if(x = x, y = "b") # replace "b" with NA
Posted by: Guest on February-03-2021

Browse Popular Code Answers by Language