Hello,

I have a dataframe with data such as:
> dat$BEGINDATUM[3]
[1] 13-09-2007
> dat$BEGINDATUM[4]
[1] 01-11-2007

> class(dat$BEGINDATUM[3])
[1] "factor"

Now I need to make calculation with these dates.
But I get these result:
> as.date(as.character(dat$BEGINDATUM[3]))
[1] <NA>
> as.date(as.character(dat$BEGINDATUM[4]))
[1] 11Jan2007

How can i convert these factors to make calculations possible.

Thanks for the answer,
Andre

        [[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