I have some data whose date column consists of two types of date entries:
(a) year-only entries (eg "1983") and
(b) full date info (eg September 12, 1962).

Here's what the non-standard date info looks like:
> mode(non.standard.dates)
[1] "numeric"
> head(non.standard.dates)
[1] July 15, 1925     February 13, 1923 July 10, 1988     February 24, 1931
[5] 1952     January 9, 1957
1638 Levels: 1732 1735 1736 1740 1745 1748 1749 1750 1752 1754 1757 1760 ... 
September 9, 1898

I just want to extract out the year information (viz in the example above: 
1925, 1923, 1988, 1931, 1952 and 1957) and create a "year" column. Have tried 
using the R date libraries without success, but they seem more designed for 
working with dates which are standardized the same way.... I'd really 
appreciate suggestions from more experienced R folks. Thank you.




      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to