Select data in the middle X percent of the length of the tunnel
select_x_percent(obj_name, desired_percent = 33, ...)
obj_name | The input viewr object; a tibble or data.frame with attribute
|
---|---|
desired_percent | Numeric, the percent of the total length of the tunnel that will define the region of interest. Measured from the center outwards. |
... | Additional arguments passed to/from other pathviewR functions |
A viewr object (tibble or data.frame with attribute
pathviewR_steps
that includes "viewr"
) in which data outside
the region of interest have been removed.
Other data cleaning functions:
gather_tunnel_data()
,
get_full_trajectories()
,
quick_separate_trajectories()
,
redefine_tunnel_center()
,
relabel_viewr_axes()
,
rename_viewr_characters()
,
rotate_tunnel()
,
separate_trajectories()
,
standardize_tunnel()
,
trim_tunnel_outliers()
,
visualize_frame_gap_choice()
Vikram B. Baliga
motive_data <- read_motive_csv(system.file("extdata", "pathviewR_motive_example_data.csv", package = 'pathviewR')) ## Clean the file. It is generally recommended to clean up to the ## "trimmed" step before running rotate_tunnel(). motive_rotated <- motive_data %>% relabel_viewr_axes() %>% gather_tunnel_data() %>% trim_tunnel_outliers() %>% rotate_tunnel() ## Now select the middle 50% of the tunnel motive_selected <- motive_rotated %>% select_x_percent(desired_percent = 50) ## Compare the ranges of lengths to see the effect range(motive_rotated$position_length)#> [1] -1.235780 1.406689#> [1] -0.6605554 0.6605359