Re: [R] I meant bwlabel

2009-06-24 Thread Sandor Benczik
aliceduggan wrote: > > Sorry I meant bwlabel on this message > [...] > I am using R-Image in an MSc statistics dissertation and have found, in > various EBImage manuals a functions - bwimage, which I would like to use, > however I can't find it within my version of R. > Could you tell me if the

Re: [R] Vector of string

2009-06-23 Thread Sandor Benczik
njhuang86 wrote: > > Hi all. Suppose I have a vector of strings ie: ["12384", "AVC_TYU123123", > "ESPN_TYU", "TYU_TYU", "AVC3939", "hhr1919", "TYU0029"] > > Is there an efficient method that would allow me to return a vector of the > position of strings that start with "TYU"? So essentially,

Re: [R] vector and NA

2009-06-23 Thread Sandor Benczik
alfreale wrote: > > > I've a vector like this: > >> inc[,5] > > How can I extract a vector without the NA value? > > inc[,5][!is.na(inc[,5])] -- View this message in context: http://www.nabble.com/vector-and-NA-tp24162879p24163839.html Sent from the R help mailing list archive at Nabbl

[R] Vectorize linear autoregression with variable coefficients

2009-06-23 Thread Sandor Benczik
This might be obvious to some, but I can't find a neat way to do it: Say I have two (very long) numerical vectors a & b of the same length representing variable coefficients of a linear autoregression. I want to calculate vector x defined by x[1] <- b[1] for (n in 2:length(a)) x[n] <- a[n]*x[n-1]