[R] stop calculation in a function

jeff6868 geoffrey_klein at etu.u-bourgogne.fr
Thu May 10 14:41:53 CEST 2012


Thanks for your answer too Berend.
Yes you're right about x[i+1]. You answered juste before me.
Well your idea of declaring all in numeric is great. It avoids my problem.
But actually I also have small missing data gaps in the rest of my data (in
the middle of numeric values).
And one of the aim of my function is to avoid comparison between 2 numeric
values which are separated with a long period of time (with NA inside), in
order for example not to compare a value of the 1st january and the next
numeric value of the 1st april.
I'm trying to combine both. For the moment, it works only for data which
doesn't ends with NAs as you've understood. With numeric() for st1, the
problem of NAs at the end is solved but it creates a new problem with the
other NAs (which was OK before). Do you better understand what I'm trying to
do?
If you have an other idea, It'll be welcomed.
Thanks

--
View this message in context: http://r.789695.n4.nabble.com/stop-calculation-in-a-function-tp4622964p4623391.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list