search for: calciumflag

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

2011 Dec 06
1
help wrapping findInterval into a function
...a function so that I can run multiple findInterval functions for many different water-quality analyses (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))]),&qu...