[Rd] format Date
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 18 12:24:10 CEST 2008
On Sun, 17 Aug 2008, sayeed hussain wrote:
> Hey people..
Wrong 'people': this is a question for R-help, and please study the
R posting guide.
> I have been trying this code
> write.table(data.frame(date,name,amount,details),file="C:/Documents and
> Settings/Administrator/My Documents/Account/Account
> check<-read.table("C:/Documents and Settings/Administrator/My
> #My na.strings="NA" is not showing NA's in blank entries
It is not documented to.
> # check$Date is of the format("%Y-%m-%d")
Really? I think most likely it is a character string.
> # I want to change it to
> # I get this error
> Error in switch(mode(x), "NULL" = "NULL", character = .Internal(format(x, :
> invalid 'trim' argument
Did you read ?format: trim is the second argument, and this is not a
So, please read the posting guide and post a complete reproducible example
there. Then people may be prepared to help you, if they believe you have
made a reasonable effort to help yourself.
> [[alternative HTML version deleted]]
> R-devel at r-project.org mailing list
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel