View source: R/impute_coords.R
impute_coords | R Documentation |
impute_coords()
imputes missing lon/lat coordinates that occur during GPS lapses.
impute_coords(
df,
dt_field = NULL,
distance_threshold = 100,
jitter_amount = 5e-05,
show_lapse_distance = FALSE,
fill_open_lapses = FALSE,
speed_threshold = NULL,
speed_window = NULL,
open_lapse_length = NULL
)
df |
data frame containing latitude ( |
dt_field |
character; name of datetime field. |
distance_threshold |
numeric; distance (meters) between the last known coordinates before GPS signal loss and the first known coordinates following signal loss are compared to this value. If the distance exceeds this threshold, coordinates are not imputed. Default = 100 meters. |
jitter_amount |
numeric; amount of jitter to apply to imputed coords.
Default = 0.00005 decimal degrees. See |
show_lapse_distance |
logical; if |
fill_open_lapses |
logical; if |
speed_threshold |
numeric; criteria to impute open lapses. If the median speed (m/s) of coordinates before or after an open lapse exceeds this threshold, coordinates are not imputed. |
speed_window |
numeric; number of rows used to calculate |
open_lapse_length |
numeric; if the number of rows in an open lapse exceed this threshold, coordinates are not imputed. |
a data frame. An additional column is created to indicate whether coordinates were imputed ('imputed_coord').
## Not run:
impute_coords(df,
distance_threshold = 100, jitter_amount = 0.00001, fill_open_lapses = FALSE,
speed_threshold = NULL, speed_window = NULL, open_lapse_length = NULL
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.