[R] Accessing DF index
David Winsemius
dwinsemius at comcast.net
Sun Feb 20 00:00:09 CET 2011
On Feb 19, 2011, at 5:25 PM, eric wrote:
>
> So how would I convert those row names to dates and give that column
> the name
> "Date" so that I can use subset and other functions on the Date
> column ?
You could have used subset without the new column:
> subset(x2, rownames(x2) < "2000-11-30")
FAIRX SP500 delta dtcol
2000-08-31 0.01010110 0.007426964 0.002674132 2000-08-31
2000-09-29 0.09667973 -0.054966292 0.151646023 2000-09-29
2000-10-31 -0.00824558 -0.004961785 -0.003283795 2000-10-31
> --
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list