Displaying 1 result from an estimated 1 matches for "wqfunc".
2011 Dec 06
1
help wrapping findInterval into a function
...= "Calcium", (flags <-
c("Y", 'Q', "", "A") [findInterval(WQdata$value, c(-Inf, 0.027, 0.1, 100,
Inf))]),""))
However, it does not worked when wrapped in a function (no error messages
are thrown, it simply does not seem to do anything):
WQfunc <- function() {
WQdata$CalciumFlag <- with(WQdata, ifelse(analysis == "Calcium", (flags <-
c("Y", 'Q', "", "A") [findInterval(WQdata$value, c(-Inf, 0.027, 0.1, 100,
Inf))]),""))
}
Calling the function WQfunc() does not produce an...