Qianfeng Li
2009-May-04 14:34 UTC
[R] how to remove ( ) ? when using write.csv(chron.object)
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]]
Gabor Grothendieck
2009-May-04 15:01 UTC
[R] how to remove ( ) ? when using write.csv(chron.object)
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. > >