Hallo all somebody knows if exist a command who makes the opposite of what "diff" command do? I'he to write code? thanks Michele
What do you mean by "opposite"? Have you looked at patch? -roger michele lux wrote:> Hallo all > somebody knows if exist a command who makes the > opposite of what "diff" command do? > I'he to write code? > thanks Michele > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
?cumsum michele lux wrote:>Hallo all >somebody knows if exist a command who makes the >opposite of what "diff" command do? >I'he to write code? >thanks Michele > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >
On 13 Apr 2004 at 18:58, michele lux wrote:> Hallo all > somebody knows if exist a command who makes the > opposite of what "diff" command do? > I'he to write code? > thanks Michele >As other responses has shown, your Q could have been clearer! ?diffinv note that this is not really an inverse, as the following shows:> diffinv(diff(1:10))[1] 0 1 2 3 4 5 6 7 8 9 If you know the first element of your original series, you can do:> diffinv(diff(3:13), xi=3)[1] 3 4 5 6 7 8 9 10 11 12 13 Kjetil Halvorsen> ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html