Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

replace na with 0 in R

library(dplyr)
#Replacing missing values with 0 in columns 'x' and 'y' of the tibble dataframe 'df'
df %>% 
  replace_na(list(x = 0, y = 0))
 
PREVIOUS NEXT
Tagged: #replace #na #R
ADD COMMENT
Topic
Name
8+9 =