Re: [R] Append a value to a vector

2011-08-25 Thread Claudio Zanettini
Oh thanks, yes now I understand. I did not realized that I did not save it. :) 2011/8/24 Jean V Adams jvad...@usgs.gov Claudio Zanettini claudio.zanett...@gmail.com wrote on 08/24/2011 04:33:50 PM: Thank you, this work fine, and is not contorted like mine:) In this case lastV=LastI

[R] Append a value to a vector

2011-08-24 Thread Claudio Zanettini
This should be easy but it does not work I have 3 vectors*(activeT,inactT, activeR)*, the idea is that if the last value in inactT is higher than the last in activeT this value has to be append in active T and the last value in another vector call activeR has to be repeated. (at the bottom you can

Re: [R] Append a value to a vector

2011-08-24 Thread Jean V Adams
Claudio Zanettini wrote on 08/24/2011 03:04:39 PM: This should be easy but it does not work I have 3 vectors*(activeT,inactT, activeR)*, the idea is that if the last value in inactT is higher than the last in activeT this value has to be append in active T When you say this value which one

Re: [R] Append a value to a vector

2011-08-24 Thread Jean V Adams
I'm still a little confused about lastV and lastI. The code you provide uses lastV, but your description seems to refer to lastI. Test out this code and see if it is doing what you want it to do. lastI lastA activeT activeR if(lastI lastA) { activeT - c(activeT, lastI)

Re: [R] Append a value to a vector

2011-08-24 Thread Claudio Zanettini
Thank you, this work fine, and is not contorted like mine:) In this case lastV=LastI but depending on the data that I obtain lastV can be = LastA. Any way it works very good:) Thank you very much :) PS: but I still do not understand what was wrong in the script that I used, It was not very

[R] Append a value to a vector

2011-08-24 Thread heverkuhn
This should be easy but it does not work I have 3 vectors*(activeT,inactT, activeR)*, the idea is that if the last value in inactT is higher than the last in activeT this value has to be append in active T and the last value in another vector call activeR has to be repeated. (at the bottom you can

Re: [R] Append a value to a vector

2011-08-24 Thread Jean V Adams
Claudio Zanettini claudio.zanett...@gmail.com wrote on 08/24/2011 04:33:50 PM: Thank you, this work fine, and is not contorted like mine:) In this case lastV=LastI but depending on the data that I obtain lastV can be = LastA. Any way it works very good:) Thank you very much :)