search for: numconsecout

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

2013 Mar 23
1
Error with custom function in apply: ”Error in FUN(newX[, i], ...) : unused argument(s) (newX[, i])”
...a loop (see below), which work fine by entering the values of each row in our function but it will take several days to complete. The idea is to see if we can use our function with apply. Basically, data$Results<-apply(data,1, ColChange, LowLim=data[1], HighLim=data[2], Vals=data[3:6], NumConsecOut=2) But we get the following error: ?Error in FUN(newX[, i], ...) : unused 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 <- funct...