[R] How do I use as.Date when day values are missing?

2008-02-24 Thread Anupa Fabian
I have a data frame which contains some valuable date information. But for a few of the dates, the day information missing . Viz: > interesting.data$date [1] "1/22/93" "1/22/93" "1/23/93" "1/00/93" "1/28/93" "1/31/93" "1/12/93" i.e. for dates where the day info is missing, the "%d" part of the

[R] Extracting Year (only) information from Non-Standard Dates

2007-12-16 Thread Anupa Fabian
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 F