[R] Creating file names.

Tony Breyal tony.breyal at googlemail.com
Fri Jan 9 01:12:13 CET 2009


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... at gmail.com wrote:
> 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 to
> have something like this:
>
> LMSMOD_Jan_08_09_1404
>
> Does anyone know how I can do this?
>
> (You don't have to put in the underscores, if it's too much work.)
>
> Thanks,
>
> Gregg Allen
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list