[R] Extract pattern from string

syrvn mentor_ at gmx.net
Tue Nov 15 18:48:20 CET 2011


with Sys.time() you get the following string:

"2011-11-15 16:25:55 GMT"

How can I extract the following substrings:

year <- 2011

month <- 11

day_time <- 15_16_25_55



View this message in context: http://r.789695.n4.nabble.com/Extract-pattern-from-string-tp4073432p4073432.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list