i want to replace NA values with mean of specific column of data set. i tried following code
ne1<-reactive({
li3<-me2()
for(i in 1:ncol(li3)){
li3[is.na(li3[,i]), i] <- mean(li3[,i], na.rm = TRUE)
}
li3
})
i got error saying argument of length 0
.
why its shows length is 0?How can i solve this error