## Import sample data from package
motive_data <-
read_motive_csv(system.file("extdata", "pathviewr_motive_example_data.csv",
package = 'pathviewr'))
## Process data up to and including insert_treatments()
motive_data_full <-
motive_data %>%
relabel_viewr_axes() %>%
gather_tunnel_data() %>%
trim_tunnel_outliers() %>%
rotate_tunnel() %>%
select_x_percent(desired_percent = 50) %>%
separate_trajectories(max_frame_gap = "autodetect") %>%
get_full_trajectories(span = 0.95) %>%
insert_treatments(tunnel_config = "v",
perch_2_vertex = 0.4,
vertex_angle = 90,
tunnel_length = 2,
stim_param_lat_pos = 0.1,
stim_param_lat_neg = 0.1,
stim_param_end_pos = 0.3,
stim_param_end_neg = 0.3,
treatment = "lat10_end_30") %>%
## Now calculate the minimum distances to each wall
calc_min_dist_v(simplify_output = TRUE)
## See 3 new variables for calculations to lateral and end walls
names(motive_data_full)
Run the code above in your browser using DataLab