library(pathviewr)
## Import the example Motive data included in the package
motive_data <-
read_motive_csv(system.file("extdata", "pathviewr_motive_example_data.csv",
package = 'pathviewr'))
## Clean, isolate, and label trajectories
motive_full <-
motive_data %>%
clean_viewr(desired_percent = 50,
max_frame_gap = "autodetect",
span = 0.95)
## Interpolate missing data via this function
motive_filling <-
motive_full %>%
fill_traj_gaps()
## plot all trajectories (before)
plot_viewr_trajectories(motive_full, multi_plot = TRUE)
## plot all trajectories(after)
plot_viewr_trajectories(motive_filling, multi_plot = TRUE)
Run the code above in your browser using DataLab