[R] Finding a Diff within a Dataframe columns

Ramya ramya.victory at gmail.com
Mon Jan 31 04:49:46 CET 2011

Hi jholtman,

Thanks a ton it just worked. if you dont mind can you explain the code it a
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?

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.

More information about the R-help mailing list