Hi jholtman, Thanks a ton it just worked. if you dont mind can you explain the code it a little sapply(seq(from = 1, by = 2, length = ncol(x) %/% 2), function(a){ + x[[a]] - x[[a + 1]] + })
wat is the purpose of double percent sign and is the sapply the function we generally use for the Dataframe? Thanks Ramya -- View this message in context: http://r.789695.n4.nabble.com/Finding-a-Diff-within-a-Dataframe-columns-tp3247943p3248066.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.