04pallav
9/13/2017 - 9:25 PM

Remove NA's from a dataframe and replace by 0

Remove NA's from a dataframe and replace by 0

d[is.na(d)] <- 0
##replaicng all na's

data[is.na(data$noofreservations),c('noofreservations')]=0  
## replacing na's only in column