Hi all, I have a dataset that includes a "date" variable. Each observation includes a date in the form of 2/15/15, for example. I'm looking to create a new indicator variable that is based on the date variable. So, for example, if the date is earlier than today, I would need a "0" in the new column, and a "1" otherwise. Note that my dataset includes dates from 1979-2012, so it is not one-year (this means I can't easily create a new variable 1-365).
How does R handle dates? My hunch is "not well," but perhaps there is a package that can help me with this. Let me know if you have any recommendations as to how this can be done relatively easily. Thanks! Appreciate it. Best, Brian [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.