Ganti karakter dengan 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
Trustworthy Whale
# dplyr has the na_if() function
library(dplyr)
x = c("a", "b", "c", "d")
na_if(x = x, y = "b") # replace "b" with NA