[R] Creating file names.

2009-01-08 Thread greggallen
I have a function that is called from a sourced script, whenever certain conditions are met. I have this inside it: if(P 0.9)save( file = today() , myLMSmodel ); This gives me files that look like this: Thu Jan 8 14:04:43 2009 That works fine on my Mac, but it would be much more convenient

Re: [R] Creating file names.

2009-01-08 Thread Peter Alspach
-help@r-project.org Subject: [R] Creating file names. I have a function that is called from a sourced script, whenever certain conditions are met. I have this inside it: if(P 0.9)save( file = today() , myLMSmodel ); This gives me files that look like this: Thu Jan 8 14:04:43 2009

Re: [R] Creating file names.

2009-01-08 Thread Don MacQueen
Your easiest starting point is probably file = format(Sys.time()) and then look at the online help for the strptime function to learn about formatting options. For example format( Sys.time() , '%m%d%y' ) Use paste() and some formatting of Sys.time() to construct the form you are

Re: [R] Creating file names.

2009-01-08 Thread Tony Breyal
Hi, if i understood correctly, you probably want the something like: ## R format(Sys.time(), LMSMOD_%b_%d_%y_%H%M) (works on windows, don't know about Mac) Hope that helps a little, Tony Breyal On 8 Jan, 23:47, greggal...@gmail.com wrote: I have a function that is called from a sourced