Skip to content
Prev 166412 / 398502 Next

Creating file names.

Gregg

You could either manipulate the character returned by today(), or try
using Sys.time() instead.  For example, on Windows,

paste(strsplit(date(), ' ')[[1]][c(2,3,5,4)], collapse='_')

gives

Jan_09_2009_13:40:57

which approaches what you want.  Alternatively

format(Sys.time(), "%b_%d_%y_%H%M")

gives

Jan_09_09_1342

which only needs LMSMOD pasted to the front which sep='_'.

HTH ...

Peter Alspach
The contents of this e-mail are confidential and may be subject to legal privilege.
 If you are not the intended recipient you must not use, disseminate, distribute or
 reproduce all or any part of this e-mail or attachments.  If you have received this
 e-mail in error, please notify the sender and delete all material pertaining to this
 e-mail.  Any opinion or views expressed in this e-mail are those of the individual
 sender and may not represent those of The New Zealand Institute for Plant and
 Food Research Limited.