Marsha Melnyk wrote:
> 
> I don't know if there is a way to do this in R but I want to subtract 
> within the same column from different rows.  I want to subtract 
> c(r)-c(r-1) and continue down the column until they are all calculated 
> and form another column. Again I don't know if R can do this but I 
> thought I would ask.
> 
> 

Can't tell quite what you want -- can you give an example?

Does apply(X,2,diff) do it?

-- 
View this message in context: 
http://www.nabble.com/row-subtraction-tp26052146p26053157.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.

Reply via email to