View source: R/VMS_clean_recs.R
VMS_clean_recs | R Documentation |
This function takes raw VMS data (i.e. a dataframe having sequential coordinates and
times) and cleans it. Data is cleaned by removing records that are no more than minDist_m
from the previous position. Additionally, resultant data is grouped into "treks" which can be
thought of as discrete forays by a vessel. A new trek occurs when the time between subsequent
points for a vessel exceeds maxBreak_mins
, which by default is 24 hours (1440 mins).
VMS_clean_recs(
df = NULL,
lat.field = "LATITUDE",
lon.field = "LONGITUDE",
objField = "VR_NUMBER",
timeField = "POSITION_UTC_DATE",
minDist_m = 50,
maxBreak_mins = 1440,
minKnots = NULL,
maxKnots = NULL,
speedField = "calc",
dropOrphans = T
)
df |
default is |
lat.field |
the default is |
lon.field |
the default is |
objField |
default is |
timeField |
default is |
minDist_m |
the default is |
maxBreak_mins |
the default is |
minKnots |
default is |
maxKnots |
default is |
speedField |
default is |
dropOrphans |
default is |
a dataframe with an additional "trek" column identifying a number of
discrete paths for each unique value of objField
.
If a field called "UPDATE_DATE" exists, it will be used to "break ties" in the case of duplicate records (i.e. the more recent record will is retained.
Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca
Other vms:
VMS_get_recs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.