Replace NA with Zero in dplyr without using list()
To replace all NAs in a dataframe use
df %>% replace(is.na(.), 0)
dt <- mutate(dt, x = ifelse(is.na(x), 0, x))
To replace all NAs in a dataframe use
df %>% replace(is.na(.), 0)
dt <- mutate(dt, x = ifelse(is.na(x), 0, x))