search for: daterain

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

Did you mean: daterainc
2007 Jul 25
1
how to use "replace" for efficiency
...; any(wheat2[i,5:7]>wheat2[i,8])) { wheat2[i,5:7] <- NA } } I tried this: wheat1 <- replace(wheat2[,5:7],is.na(wheat2[i,5:7])==FALSE && any(wheat2[i,5:7]>wheat2[i,8]),NA) wheat3 <- cbind(wheat2[1:4],wheat1,wheat2[,8]) > wheat3[5539,] # the culprit row DateRain Rain StartDate EndDate RO.A RO.B RO.C filtered.Rain 5539 28-Feb-58 0 27-Feb-58 28-Feb-58 61.5 88.7 65 0 Not sure what I am doing wrong, any help is appreciated Willem Here is a data sample and note the very high value for runoff (RO) and no rainfall o...