[R] extracting months from a data

KMNanus kmnanus at gmail.com
Wed Mar 9 19:14:25 CET 2016


I have a series of dates in  format 3-Oct, 10-Oct, 20-Oct, etc.

I want to create a variable of just the month.  If I convert the date to a character string, substr is ineffective because some of the dates have 5 characters (3-Oct) and some have 6 (10-Oct).

Is there a date function that accomplishes this easily?

Ken
kmnanus at gmail.com
914-450-0816 (tel)
347-730-4813 (fax)





More information about the R-help mailing list