search for: testvec

Displaying 5 results from an estimated 5 matches for "testvec".

2007 Aug 10
1
[Fwd: Re: How to apply functions over rows of multiple matrices]
...oughts 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 } fillafter <-...
2009 Dec 01
2
Cut intervals (character) to numeric midpoint; regex problem
...with the head of a 499 element matrix whose column names are now the labels trom a cut() operation, I needed to get to a vector of midpoints to serve as the basis for plotting a calibration curve ( exp(linear predictor) vs. : > dput(head(dimnames(mtcal)[2][[1]])) # was starting point testvec <- c("(-8.616,-3.084]", "(-3.084,-2.876]", "(-2.876,-2.756]", "(-2.756,-2.668]", "(-2.668,-2.597]", "(-2.597,-2.539]") I started this message with the thought of requesting an answer but kept asking myself if I really had check the...
2008 Sep 26
1
auto.arima help
I am calling auto.arima with a time series that is about 186 observations long with a frequency of 52. With some time series I get: 1:last.nonzero: result would be too long a vector Is there something that I can do to the data to avoid this error? Thank you. Kevin
2007 Aug 11
0
DOE and interaction plot general 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(applve...
2011 Jul 01
13
For help in R coding
Dear all, I am doing a project on variant calling using R.I am working on pileup file.There are 10 columns in my data frame and I want to count the number of A,C,G and T in each row for column 9.example of column 9 is given below- .a,g,, .t,t,, .,c,c, .,a,,, .,t,t,t .c,,g,^!. .g,ggg.^!, .$,,,,,.,