extrapolate_moment | R Documentation |
Intended for the use in custom step functions.
extrapolate_moment(moment, timestep, cur_time, new_time = NULL)
moment |
Position tibble with extra columns 'direction' and 'speed' |
timestep |
How far into future should the objects move (linearly) |
cur_time |
Current time, for time-sensitive speed functions (e.g., accelerations) |
new_time |
New time value for the returned object. If omitted, it is calculated automatically as 'cur_time + timestep' |
Another moment - position tibble with extra columns 'direction' and 'speed' corresponding to time_next
moment <- position8c %>% add_random_direction() %>% dplyr::mutate(speed = 3) extrapolate_moment(moment, 0.1, 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.