examples/create_refined_times.R

ref_scale <- 0.5
behav_times <- c(10,14.3,27.8,40)
obs_times <- c(15,20,25,30,35)

# In the following there is an observation at time 15, placed at index 12 on the refined scale.
# The loc_index is therefore 11 as the bearing and step and index 11 take you to the location at index 12.
create_refined_times(ref_scale, behav_times, obs_times)
# $refined_times
# [1] 10.00000 10.47778 10.95556 11.43333 11.91111 12.38889 12.86667 13.34444 13.82222
# [10] 14.30000 14.65000 15.00000 15.50000 16.00000 16.50000 17.00000 17.50000 18.00000
# [19] 18.50000 19.00000 19.50000 20.00000 20.50000 21.00000 21.50000 22.00000 22.50000
# [28] 23.00000 23.50000 24.00000 24.50000 25.00000 25.46667 25.93333 26.40000 26.86667
# [37] 27.33333 27.80000 28.24000 28.68000 29.12000 29.56000 30.00000 30.50000 31.00000
# [46] 31.50000 32.00000 32.50000 33.00000 33.50000 34.00000 34.50000 35.00000 35.50000
# [55] 36.00000 36.50000 37.00000 37.50000 38.00000 38.50000 39.00000 39.50000 40.00000
#
# $loc_index
# [1] 11 21 31 42 52 63
#
# $loc_index_start
# [1]  1 12 22 32 43 53
a-parton/CTStepTurn documentation built on May 14, 2019, 4:17 p.m.