Displaying 1 result from an estimated 1 matches for "magnesiumflag".
2011 Dec 06
1
help wrapping findInterval into a function
...(WQdata$value, c(-Inf, 0.027, 0.1, 100,
Inf))]),""))
WQdata$SodiumFlag <- with(WQdata, ifelse(analysis == "Sodium", (flags <-
c("Y", 'Q', "", "A") [findInterval(WQdata$value, c(-Inf, 0.050, 0.125, 125,
Inf))]),""))
WQdata$MagnesiumFlag <- with(WQdata, ifelse(analysis == "Magnesium", (flags
<- c("Y", 'Q', "", "A") [findInterval(WQdata$value, c(-Inf, 0.065, 0.15, 75,
Inf))]),""))
.....etc for additional water-quality analyses...
}
As an aside, I started working wi...