GapFinder {TrackReconstruction} | R Documentation |
Find gaps in your data file
Description
The function looks at the DateTime or Date and Time stamps of your data file and sees if any consecutive
entries have a difference of greater than the timediff
parameter.
Usage
GapFinder(rawdata, timediff = 1, timeformat = "%d-%b-%Y %H:%M:%S")
Arguments
rawdata |
Data with a combined DateTime or separate Date and Time stamp columns labeled as such. |
timediff |
The amount of time in seconds that is expected between each entry (row). Typically this would be
your data collection Hz (for Hz=16, |
timeformat |
Format of the DateTime or separate Date and Time stamp after it is pasted together with a space between.
See the |
Value
Returns a data frame with 4 columns indicating the row that the gap occurs, the amount of time between the gap, and the DateTime stamp on either end of the gap. The data frame holds a maximum of 1000 entries, so if you have more gaps, then you can alter the program to create a larger dataframe. Hopefully you don't have anywhere near that many gaps.
Author(s)
Brian Battaile
Examples
data(rawdatagap)
gaps<-GapFinder(rawdatagap, timediff = 1, timeformat = "%d-%b-%Y %H:%M:%S")
#how timediff and a lack of decimal seconds information interact given a Hz of 16.
gaps<-GapFinder(rawdatagap, timediff = 1/16, timeformat = "%d-%b-%Y %H:%M:%S")