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.
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.