I have a data set with ~10 variables (i.e. columns).

I wrote this little function to replace missing values
with zero.  

“ sz <- function(x) { ifelse(is.na(x)==F,x,0) } “

Can anyone help with a function that replaces missing
values with the median of the non-missing values?

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to