search for: applvec

Displaying 2 results from an estimated 2 matches for "applvec".

Did you mean: apple
2007 Aug 10
1
[Fwd: Re: How to apply functions over rows of multiple matrices]
...ing my thoughts about the particular example. My question was a bit more general though, as I have different functions which are applied row-wise to multiple matrices. An example that sets all values of a row of matrix A to NA after the first occurrence of TRUE in matrix B. fillfrom <- function(applvec, testvec=NULL) { if (is.null(testvec)) testvec <- applvec if (length(testvec) != length(applvec)) { stop("applvec and testvec have to be of same length!") } else if(any(testvec, na.rm=TRUE)) { applvec[min(which(testvec)) : length(applvec)] <- NA } applvec } fillaf...
2007 Aug 11
0
DOE and interaction plot general question
...question was a bit more general though, as I have different > > functions which are applied row-wise to multiple matrices. An > > example that sets all values of a row of matrix A to NA after the > > first occurrence of TRUE in matrix B. > > > > fillfrom <- function(applvec, testvec=NULL) { > > if (is.null(testvec)) testvec <- applvec > > if (length(testvec) != length(applvec)) { > > stop("applvec and testvec have to be of same length!") > > } else if(any(testvec, na.rm=TRUE)) { > > applvec[min(which(testvec)) : leng...