Print

Print


Hi Steven,

If you haven't set the timezone for your data correctly, that can be an issue -- the default is UTC, which is EST + 4 or 5 hours (depending on daylight savings)

Grabbing the tide data from the "rtide" package looks like it has geographical data, which sets an appropriate time zone:
```
tz(tidepredict$Date.Time[1]) # returns "EST"
```

while the default for your counts is UTC:
```
tz(counts$Date.Time[1]) # returns "UTC"
```

When you convert your read-in csv data using `mdy_hm()`, you should be able to specify the time zone, which I think will solve your issue.

Best,


On Fri, Dec 7, 2018 at 11:20 AM Longmire,Steven <[log in to unmask]> wrote:

Hi everyone,


I have a (large) dataset of tide level predictions that are in an interval of every five minutes, and I have a (large) dataset of bird observations with a date.time stamp. I am trying to see if there is a correlation with tide level and bird counts. 


Issue: whenever I try to merge the two data frames by date.time using 'left_join', it LOOKS like it works, and the date.times seem to line up, but when comparing the tide levels to the original data set's tide levels at the same time stamp, it is very off (shifted by about 5 hours or so). I think it has something to do with the date.times, because when I converted both to numeric to compare, two of the seemingly identical times gave different numerical values and tide levels.


Any help is appreciated!


Steven



This list strives to be beginner friendly. However, we still ask that you PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
This list strives to be beginner friendly. However, we still ask that you PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.