search for: fillfrom

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

2007 Aug 10
1
[Fwd: Re: How to apply functions over rows of multiple matrices]
...gt; Thank you for clearing 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...
2007 Aug 11
0
DOE and interaction plot general question
...r 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...