Package: pathviewr 1.1.7

Vikram B. Baliga

pathviewr: Wrangle, Analyze, and Visualize Animal Movement Data

Tools to import, clean, and visualize movement data, particularly from motion capture systems such as Optitrack's 'Motive', the Straw Lab's 'Flydra', or from other sources. We provide functions to remove artifacts, standardize tunnel position and tunnel axes, select a region of interest, isolate specific trajectories, fill gaps in trajectory data, and calculate 3D and per-axis velocity. For experiments of visual guidance, we also provide functions that use subject position to estimate perception of visual stimuli.

Authors:Vikram B. Baliga [aut, cre], Melissa S. Armstrong [aut], Eric R. Press [aut], Anne-Sophie Bonnet-Lebrun [rev], Marco Sciaini [rev]

pathviewr_1.1.7.tar.gz
pathviewr_1.1.7.zip(r-4.5)pathviewr_1.1.7.zip(r-4.4)pathviewr_1.1.7.zip(r-4.3)
pathviewr_1.1.7.tgz(r-4.4-any)pathviewr_1.1.7.tgz(r-4.3-any)
pathviewr_1.1.7.tar.gz(r-4.5-noble)pathviewr_1.1.7.tar.gz(r-4.4-noble)
pathviewr_1.1.7.tgz(r-4.4-emscripten)pathviewr_1.1.7.tgz(r-4.3-emscripten)
pathviewr.pdf |pathviewr.html
pathviewr/json (API)
NEWS

# Install 'pathviewr' in R:
install.packages('pathviewr', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ropensci/pathviewr/issues

On CRAN:

animal-movementflydramotionmovement-dataoptitracktrajectoriestrajectory-analysisvisual-guidancevisual-perception

47 exports 7 stars 1.48 score 45 dependencies 392 downloads

Last updated 1 years agofrom:e591cb8881 (on master)

Exports:%>%as_viewrbind_viewr_objectscalc_min_dist_boxcalc_min_dist_vclean_by_spanclean_viewrclean_viewr_batchdeg_2_radexclude_by_velocityfill_traj_gapsfind_curve_elbowgather_tunnel_dataget_2d_angleget_3d_angleget_3d_cross_prodget_dist_point_lineget_full_trajectoriesget_header_viewrget_sfget_traj_velocitiesget_velocityget_vis_angleimport_and_clean_batchimport_and_clean_viewrimport_batchinsert_treatmentsplot_by_subjectplot_viewr_trajectoriesquick_separate_trajectoriesrad_2_degread_flydra_matread_motive_csvredefine_tunnel_centerrelabel_viewr_axesremove_duplicate_framesrename_viewr_charactersrescale_tunnel_datarm_by_trajnumrotate_tunnelsection_tunnel_byselect_x_percentseparate_trajectoriesset_traj_frametimestandardize_tunneltrim_tunnel_outliersvisualize_frame_gap_choice

Dependencies:clicolorspacecowplotcpp11data.tabledplyrfANCOVAfansifarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclelubridatemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR.matlabR.methodsS3R.ooR.utilsR6RColorBrewerrlangscalesstringistringrtibbletidyrtidyselecttimechangeutf8vctrsviridisLitewithr

Basics of data import and cleaning in pathviewr

Rendered fromdata-import-cleaning.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2021-04-19
Started: 2020-07-27

Estimating visual perceptions from tracking data

Rendered fromvisual-perception-functions.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2022-08-21
Started: 2020-09-21

Managing frame gaps with pathviewr

Rendered frommanaging-frame-gaps.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2022-08-18
Started: 2020-09-02

Readme and manuals

Help Manual

Help pageTopics
Convert data from another format into a viewr objectas_viewr
Bind viewr objectsbind_viewr_objects
Calculate minimum distance to lateral and end walls in a box-shaped experimental tunnelcalc_min_dist_box
Calculate minimum distance to lateral and end walls in a V-shaped experimental tunnelcalc_min_dist_v
Remove file_sub_traj entries that do not span the full region of interestclean_by_span
All-in-one function to clean imported objectsclean_viewr
Batch clean viewr filesclean_viewr_batch
Convert degrees to radiansdeg_2_rad
Remove trajectories entirely, based on velocity thresholdsexclude_by_velocity
Interpolate gaps within trajectoriesfill_traj_gaps
Find the "elbow" of a curve.find_curve_elbow
Gather data columns into key-value pairsgather_tunnel_data
Compute an angle in 2D spaceget_2d_angle
Compute an angle in 3D spaceget_3d_angle
Compute the cross product of two 3D vectorsget_3d_cross_prod
Compute distance between a point and a lineget_dist_point_line
Retain trajectories that span a selected region of interestget_full_trajectories
Extract header info from imported viewr objectget_header_viewr
Estimate the spatial frequency of visual stimuli from the subject's perspective in an experimental tunnel.get_sf
Recompute trajectory-specific velocitiesget_traj_velocities
Get instantaneous velocity for subjectsget_velocity
Estimate visual angles from a subject's perspective in an experimental tunnelget_vis_angle
Batch import and clean filesimport_and_clean_batch
Import + clean_viewr()import_and_clean_viewr
Batch import of files for either Motive or Flydra (but not a mix of both)import_batch
Inserts treatment and experiment informationinsert_treatments
Plot trajectories and density plots of position by subjectplot_by_subject
Plot each trajectory within a viewr objectplot_viewr_trajectories
Quick version of separate_trajectories()quick_separate_trajectories
Convert radians to degreesrad_2_deg
Import data from a MAT file exported from Flydra softwareread_flydra_mat
Import data from a CSV exported from Optitrack's Motive softwareread_motive_csv
"Center" the tunnel data, i.e. translation but no rotationredefine_tunnel_center
Relabel the dimensions as length, width, and heightrelabel_viewr_axes
Remove any duplicates or aliased frames within trajectoriesremove_duplicate_frames
Remove any rows which show sharp shifts in velocity that are likely due to tracking errorsremove_vel_anomalies
Rename subjects in the data via pattern detectionrename_viewr_characters
Rescale position data within a 'viewr' objectrescale_tunnel_data
Remove subjects by trajectory numberrm_by_trajnum
Rotate a tunnel so that perches are approximately alignedrotate_tunnel
Bin data along a specified axissection_tunnel_by
Select a region of interest within the tunnelselect_x_percent
Separate rows of data into separately labeled trajectories.separate_trajectories
Redefine frames and time stamps on a per-trajectory basisset_traj_frametime
Rotate and center a tunnel based on landmarksstandardize_tunnel
Trim out artifacts and other outliers from the extremes of the tunneltrim_tunnel_outliers
Visualize the consequence of using various max_frame_gap valuesvisualize_frame_gap_choice