[Rd] format Date

From: sayeed hussain <sayeedhussain19_at_gmail.com>
Date: Sun, 17 Aug 2008 11:29:02 +0530


Hey people..
I have been trying this code

write.table(data.frame(date,name,amount,details),file="C:/Documents and Settings/Administrator/My Documents/Account/Account Info.txt",quote=FALSE,append=TRUE,col.names=FALSE,row.names=FALSE,sep="\t")

check<-read.table("C:/Documents and Settings/Administrator/My Documents/Account/Account
Info.txt",col.names=c("Date","Name","Amount","Details"),header=FALSE,sep="\t", na.strings="NA")

#My na.strings="NA" is not showing NA's in blank entries

# check$Date is of the format("%Y-%m-%d")
# I want to change it to

check$Date<-format(check$Date,"%d-%m-%Y")

# I get this error

Error in switch(mode(x), "NULL" = "NULL", character = .Internal(format(x, :

invalid 'trim' argument

HELP Sayeed

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 18 Aug 2008 - 10:05:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Aug 2008 - 22:37:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive