[R] How do I subtract sequential values ?

eric ericstrom at aol.com
Mon Nov 29 04:29:39 CET 2010


Just starting to learn R so excuse me if this is a simple question. I'm
wondering how I get the percent difference in sequential values in one
column of a dataframe. If I had a dataframe and one of the columns was
"value", how would I go about calculating  (v2-v1)/v1 ....(v3-v2)/v2
....(v4-v3)/v3 ...etc ?
-- 
View this message in context: http://r.789695.n4.nabble.com/How-do-I-subtract-sequential-values-tp3063019p3063019.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list