datetime - convert mmm to numeric in R -


i have been given csv column called month char variable first 3 letters of month. e.g. "jan", "feb","mar",..."dec".

is there way convert numeric representation of month, 1 12, or type in date format?

thanks.

use match , predefined vector month.abb:

tst <- c("jan","mar","dec") match(tst,month.abb) [1]  1  3 12 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -