That would be because they are not dates... they don't specify the day.
Either add a day of month to the character data before you convert it, or use
the yearmon class from zoo.
Something like...
as.Date(paste("1",as.character(df$mydate),sep="-"), format='%d-%b-%y')
And why in the world are yo
> On Mar 26, 2015, at 4:11 PM, Simon Kiss wrote:
>
> Hi there: normally I’m quite comfortable with as.Date(). But this data set is
> causing problems.
>
> The core of the data frame looks like the sample data frame below, but my
> attempt to convert df$mydate to a date object returns only NA.
On 26/03/2015 21:11, Simon Kiss wrote:
Hi there: normally I’m quite comfortable with as.Date(). But this data set is
causing problems.
The core of the data frame looks like the sample data frame below, but my
attempt to convert df$mydate to a date object returns only NA. Can anyone
provide a
3 matches
Mail list logo