search for: tp4645917p4645918

Displaying 1 result from an estimated 1 matches for "tp4645917p4645918".

Did you mean: tp4645917p4645949
2012 Oct 11
4
Changing NA to 0 in selected columns of a dataframe
I've been beating my head on the table for hours now and don't understand why this doesn't work. I have a dataframe that I want to change NAs to 0 for some of the columns and not others. Consider this... >#create dataframe > A = c(1:5) > B = c(6, 7, NA, NA, NA) > C = c(NA, NA, 13, 14, 15) > D = c(16:20) > E = c(21, NA, NA, NA, 25) > data = as.data.frame ( cbind (