Hello,
It seems that there is a problem with ":".
If you only need the date, you can use as.Date(Sys.time()) instead of the
complete form.
If you need the time, you can try the following commands which change the
":" into "-" :
newsystime<-<-format(Sys.time(),"%Y-%m-%d-%H-%M-%S")
write.csv(data.f
Dear Mr Newmiller and Mr Oettli,
Thanks a lot for your valuable guidance. Task is done. Thanks again.
Regards
Vincy
--- On Wed, 7/4/12, Jeff Newmiller wrote:
From: Jeff Newmiller
Subject: Re: [R] How to use Sys.time() while writing a csv file name
To: "Vincy Pyne" , r-help@r-p
You forgot to follow the posting guide and tell us what operating system you
are using (sessionInfo), but I am going to guess that you are on Windows where
the colon (":") is an illegal symbol in filenames. Try formatting the time
explicitly in the conversion to character using the format string
Hello,
Try something like that:
> lgd <- format(Sys.time(), "%Y_%m_%d_%H_%M_%S")
Regards,
Pascal
Le 04/07/2012 14:21, Vincy Pyne a écrit :
Dear R helpers,
I am using Beta distribution to generate the random no.s (recovery rates in my
example). However, each time I need to save these random
Dear R helpers,
I am using Beta distribution to generate the random no.s (recovery rates in my
example). However, each time I need to save these random no.s in a csv format.
To distinguish different csv files, one way I thought was use of Sys.time in
the file name. My code is as follows -
# My
5 matches
Mail list logo