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) # returns "EST" ``` while the default for your counts is UTC: ``` tz(counts$Date.Time) # 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, -- Hao Ye [log in to unmask] 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 > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwIFaQ&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=QWxQId63qB2iSP1ggUL7kQsdfEWUTu6qCGEw8Xuo91A&m=b4WRmmOMr6Amcof0s09ZHRQQyh5533wA1RwRlKBoPpA&s=88TuYjpQkAGakJI1fJCAU3cU7QvI4gXDQNa9nI0R8Zw&e= > <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwMFAw&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=SEmRVMqAFbH_Cx3K2dozZfH2QG2rALCjx8XkDKdS6dE&m=DqYWew3vW5xBPNPiJ5Ww1lCNJLO8oG5YUsVr0l3snaM&s=NbQoOjNTdakpuBLmjQqG8iy3vQVw02I0nX13aE4inDc&e=> > 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.