search for: wqdata

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

Did you mean: wdata
2011 Dec 06
1
help wrapping findInterval into a function
...lyses (and I have to do this for many dataset) but it seems to fall apart when incorporated into a function. Run straighforward, the findInterval function works as desired, e.g. below, creating the new CalciumFlag column with the appropriate flag for, in this case, levels of calcium in the water: WQdata$CalciumFlag <- with(WQdata, ifelse(analysis == "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 t...