Re: [R] Tiny help for tiny function

2008-08-13 Thread Birgitle
Many thanks. Much easier than my solution B. Birgitle wrote: > > I just started to write tiny functions and therefore I appologise in > advance if I am asking stupid question. > > I wrote a tiny function to give me back from the original matrix, a matrix > showing only the values smaller -0.

Re: [R] Tiny help for tiny function

2008-08-13 Thread Henrique Dallazuanna
You can do this: ifelse(XY >= 0.8 | XY <= -0.8 | is.na(XY), XY, "low corr") On 8/13/08, Birgitle <[EMAIL PROTECTED]> wrote: > > I just started to write tiny functions and therefore I appologise in advance > if I am asking stupid question. > > I wrote a tiny function to give me back from the origi

[R] Tiny help for tiny function

2008-08-13 Thread Birgitle
I just started to write tiny functions and therefore I appologise in advance if I am asking stupid question. I wrote a tiny function to give me back from the original matrix, a matrix showing only the values smaller -0.8 and bigger 0.8. y<-c(0.1,0.2,0.3,-0.8,-0.4,0.9) x<-c(0.5,0.3,0.9,-0.9,-0.7