[R] Date in dataframe manipulation

Dan Chan dchan at GFC.STATE.GA.US
Fri Mar 24 21:29:42 CET 2006


Hi,

I have a dataframe with many columns, including date and I want to keep
only a few of the columns including date column.

I used the following command: 
with(FireDataAppling, cbind(STARTDATE, County, TOTAL, CAUSE)

It works, but the date becomes days from Jan 1, 2001.  

FireDataAppling$STARTDATE[1] gives
[1] 2001-01-04 00:00:00  
1703 Levels: .........

After the cbind command, the entry becomes a 4.  

I want to get 2001-01-04.  What command should I use?  

Thank you. 

Daniel Chan
Meteorologist
Georgia Forestry Commission
P O Box 819
Macon, GA 
31202
Tel: 478-751-3508
Fax: 478-751-3465




More information about the R-help mailing list