View source: R/utility_functions.R
select_x_percent | R Documentation |
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.
Vikram B. Baliga
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()
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) range(motive_selected$position_length)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.