search for: yr_init

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

Did you mean: br_init
2013 Mar 23
1
Error with custom function in apply: ”Error in FUN(newX[, i], ...) : unused argument(s) (newX[, i])”
...used argument(s) (newX[, i])? Any idea about this error or an alternative way to obtain the results we look for. Thank you very much, Camilo ################# Our function is: ####################### ColChange <- function(LowLim, HighLim, Vals, NumConsecOut) { cols <- ncol(Vals) yr_init = 0 k = 0 for (i in 1:cols){ val = Vals[i] if (is.na(val)){ Result="NA" next } else { if (val<LowLim||val>HighLim){ if (yr_init==0) { yr_init = colnames(Vals)[i] k = k + 1 } else { k = k + 1 }...