Re: [R] date comparison doesn't match value

2016-10-11 Thread Simon, Heather
to sometime in the year 1309. Thanks for everyone's help. Cheers, Heather -Original Message- From: Jim Lemon [mailto:drjimle...@gmail.com] Sent: Saturday, October 08, 2016 6:04 AM To: Simon, Heather <simon.heat...@epa.gov> Subject: Re: [R] date comparison doesn't match value Hi Heather, I

Re: [R] date comparison doesn't match value

2016-10-08 Thread Jim Lemon
Hi Heather, I think the problem may be that you are trying to compare a date field and a character string. R helpfully tries to wrangle the two into comparable data types. While I don't know exactly what you have done, as R for: as.numeric(alldata$new.date.local) and look at the value you get.

Re: [R] date comparison doesn't match value

2016-10-07 Thread Sarah Goslee
Hi Heather, I can't duplicate your problem: "looks like a date" is not helpful. If you use dput() to provide actual data, then maybe we can actually help you. Providing sessionInfo() would also help, as some time problems may be OS-related. Meanwhile, see if working thru this can help you get it

[R] date comparison doesn't match value

2016-10-07 Thread Simon, Heather
I am running into trouble when trying to compare date fields in my dataset. When I view a field, it looks like it is a date in 2011: > alldata$new.date.local[1] [1] "2011-07-01 12:08:07 EDT" However, when I try to compare it to a character string, it seems to think it is equal to sometime