[R] how to remove ( ) ? when using write.csv(chron.object)

Gabor Grothendieck ggrothendieck at gmail.com
Mon May 4 17:01:36 CEST 2009


Try:

> write.csv(format(mydatetime, enclosed = c("", "")))
"","x"
"1","09-05-03 10:30:00"
"2","09-06-07 10:20:00"


On Mon, May 4, 2009 at 10:34 AM, Qianfeng Li <qflichem at yahoo.com> wrote:
> Hello all,
>
> I don' like to have ( ) around my datetime, when send the csv file to somebody.
>
> How to remove it?
>
>>library(chron)
>>mydate <- c("2009-05-03","2009-06-07")
>>mytime <- c("10:30:00","10:20:00")
>>mydatetime <- chron(dates=mydate,times=mytime,format=c("y-m-d","h:m:s"))
>>write.csv(mydatetime)
>
> "","x"
> "1",(09-05-03 10:30:00)
> "2",(09-06-07 10:20:00)
>
> thanks!
> Jeff
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>




More information about the R-help mailing list