Skip to contents

jitter_dates() adds random noise (jitter) to movement dates in a movenet-format movement tibble.

Usage

jitter_dates(data, range)

Arguments

data

A movenet-format movement tibble.

range

A positive integer, indicating the maximum amount of jitter (in days) to apply to the movement dates (see Details).

Value

A movement tibble like data, but with jittered movement dates.

Details

Requires that an appropriate movement config file is loaded, to correctly identify the date column in data.

Movement dates are modified by addition of a number of days between -range and range, following a discrete uniform distribution. If this were to result in a date being moved beyond the original date range, the amount of jitter for this date is resampled, until the resulting date is within the original date range.