Re: [R] Using diff and transform

2011-01-25 Thread David Winsemius
On Jan 25, 2011, at 9:58 PM, eric wrote: I want to use diff to take the differences in a column "Close" of a data frame "y". But I'd like to do it using the transform function so a new data frame is created with a difference column. The problem is that diff gives one less than the numbe

[R] Using diff and transform

2011-01-25 Thread eric
I want to use diff to take the differences in a column "Close" of a data frame "y". But I'd like to do it using the transform function so a new data frame is created with a difference column. The problem is that diff gives one less than the number of elements in the original data frame. So transfo