create_refined_behavs: Create refined behaviours.

Description Usage Arguments Value See Also Examples

Description

create_refined_behavs creates behavioural process at the refined time scale given info about switch times and states.

Usage

1
create_refined_behavs(behav_proc, refined_times)

Arguments

behav_proc

List with elements:

times

Vector of switch times.

states

Vector of switch states.

refined_times

Vector, refined time scale.

Value

Vector, refined behaviours

See Also

Other Refined scales: create_behav_proc_from_refined, create_refined_times

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
behav_proc <- list(times = c(0, 2.3, 11.56, 17.6, 20),
                   states = c(1, 2, 3, 2, 2))
refined_times <- c(0.000000, 0.460000, 0.920000, 1.380000, 1.840000, 2.300000,
                   2.787368, 3.274737, 3.762105, 4.249474, 4.736842, 5.224211,
                   5.711579, 6.198947, 6.686316, 7.173684, 7.661053, 8.148421,
                   8.635789, 9.123158, 9.610526, 10.097895, 10.585263, 11.072632,
                   11.560000, 12.051429, 12.542857, 13.034286, 13.525714, 14.017143,
                   14.508571, 15.000000, 15.433333, 15.866667, 16.300000, 16.733333,
                   17.166667, 17.600000, 18.080000, 18.560000, 19.040000, 19.520000,
                   20.000000)
create_refined_behavs(behav_proc, refined_times)
# [1] 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2

a-parton/CTStepTurn documentation built on May 14, 2019, 4:17 p.m.