Re: [R] Help with Vectors and conditional functions

2010-08-19 Thread Nikhil Kaza
In additiion to Ivan's comment, in this case, you are just plotting Yes or No. I think thats not what you want. Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Aug 19, 2010, at 3:42 AM, Ivan Calandra wrote: Hi, I haven't spent

Re: [R] Help with Vectors and conditional functions

2010-08-19 Thread Ivan Calandra
Hi, I haven't spent too much time on it, but that might help: if (coint_tests[[i]]=="YES")... Note the double "=" which is the operator for equality. The single "=" is the assignment operator, especially with arguments. HTH, Ivan Le 8/19/2010 09:03, Ferreira, Thiago Alves a écrit : > Good mor

Re: [R] Help with Vectors and conditional functions

2010-08-19 Thread Ferreira, Thiago Alves
Good morning, I have something like this: names(coint_tests) <- apply(b,2,paste, collapse="_") which prints 15 names like: A_B, C_D, E_F, ... AA,B,C,D.. Are time series. Then there is a vector called coint_tests of length 15 which yields "yes" or "no". I need to add a function to plot the time