Package: radiatR 0.1.3

radiatR: Analyse and Visualise Headings and Trajectories on the Unit Disk

A complete pipeline for analysing directional data -- headings and trajectories on the unit disk. Supply a table of angles directly, or reconstruct headings from movement trajectories imported from tracking tools ('EthoVision', 'DeepLabCut', 'SLEAP', 'TRex', 'ANY-maze', 'TrackMate', 'idtracker.ai', and others) via a unified dialect-based loader system, including multi-bodypart pose estimation with likelihood-weighted centroid. Derives per-trial heading directions using multiple rules (ring-crossing, distal point, pose body-axis, velocity-based, and more). Computes circular statistics including mean direction, resultant length, von Mises and wrapped Cauchy parametric fits, circular correlation (circular-linear and circular-circular), circular-linear regression (Fisher and Lee (1992) <doi:10.2307/2532334>), model selection among orientation models (Fitak and Johnsen (2017) <doi:10.1242/jeb.167056>), and uniformity and multi-sample hypothesis tests (Rayleigh, Watson-Williams, Hermans-Rasson (Landler, Ruxton and Malkemper (2019) <doi:10.1186/s12898-019-0246-8>), and others) with multiple-comparison correction. Path tortuosity follows Benhamou (2004) <doi:10.1016/j.jtbi.2004.03.016>. Renders publication-quality 'ggplot2' radial plots with overlaid rose diagrams, parametric density curves, non-parametric kernel density estimates, and circular boxplots (Buttarazzi, Pandolfo and Porzio (2018) <doi:10.1111/biom.12889>). Includes a browser-based 'shiny' graphical interface requiring no R coding via launch_app().

Authors:John D. Kirwan [aut, cre, cph], A. & M.W. Mathis Labs [cph], Talmo Pereira [cph], The Trustees of Princeton University [cph]

radiatR_0.1.3.tar.gz
radiatR_0.1.3.zip(r-4.7-any)radiatR_0.1.3.zip(r-4.6-any)radiatR_0.1.3.zip(r-4.5-any)
radiatR_0.1.3.tgz(r-4.6-any)radiatR_0.1.3.tgz(r-4.5-any)
radiatR_0.1.3.tar.gz(r-4.7-any)radiatR_0.1.3.tar.gz(r-4.6-any)
radiatR_0.1.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
radiatR/json (API)

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

Bug tracker:https://github.com/johnkirwan/radiatr/issues

Pkgdown/docs site:https://johnkirwan.github.io

Datasets:
  • cpunctatus - *Cylindroiulus punctatus* visual orientation trajectory dataset

On CRAN:

Conda:

animal-behaviorcircular-statisticstrajectories

4.10 score 1 stars 136 exports 25 dependencies

Last updated from:b549ba678f. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK400
source / vignettesOK248
linux-releaseOK389
macos-releaseOK340
macos-oldrelOK295
windows-develOK273
windows-releaseOK449
windows-oldrelOK444
wasm-releaseOK113

Exports:add_angle_roseadd_circadd_circ_intervaladd_circ_meanadd_circular_boxplotadd_circular_densityadd_circular_kdeadd_critical_radd_critical_v_lineadd_heading_arrowadd_heading_densityadd_heading_intervaladd_heading_pointsadd_heading_vectorsadd_landmarkadd_multiple_circlesadd_origin_pointadd_quadrant_linesadd_radial_gridadd_stacked_headingsadd_stimulus_arcadd_ticksadd_vonmises_densityadd_wrappedcauchy_densityangular_velocityapply_transformas_angleassign_color_keyassign_colour_keyassign_cycle_colorsassign_cycle_coloursbin_anglesboot_kappa_ciboot_kappa_contrastboot_mean_cicalibrate_distancecirc_boxplot_statscirc_corcirc_dispersioncirc_displaycirc_model_selectcirc_regressioncirc_summarisecirc_summarycirc_summary_headingscircumference_labscompute_circ_intervalcompute_circ_meancompute_circular_densityconcentration_regressioncount_goal_entriescycle_colorscycle_coloursdegree_labsderive_coordsderive_headingsdirectedness_arrowdistance_scaledistance_unitelapsed_secondsfitted_directionsframe_rateget_all_object_posget_tracked_object_posget_trial_limitsgg_trajguess_columnsheadings_framehf_color_colhf_colour_colhf_coordshf_displayhf_heading_colidsimport_infoimport_tracksinstantaneous_speedlaunch_appline_circle_interceptlist_heading_ruleslist_loader_dialectslist_loader_formatsload_manifestlog_transformpath_sinuositypath_straightnesspath_tortuosityplot_profileplot_speed_directionplot_speed_histogrampose_to_headingsrad_shepherdradial_themeradiateread_tracksread_tracks_dirread_tracks_formatreferenceregister_heading_ruleregister_loader_dialectregister_loader_formatrestrict_to_circumferencescale_cardinalscale_clockscale_monthsscale_secondssector_summaryset_distance_scaleset_frame_rateset_referenceset_transform_historysimulate_trackssinuositystack_headingsstep_speedstraightness_indextest_concentrationtest_distributionstest_goftest_mean_directionstest_symmetrytest_uniformitytest_unimodalitytortuosity_ratiotrack_durationtrack_lengthtrack_speedtrack_turningtrack_velocitytrackstransform_historyvelocity_anglevelocity_vectorvonmises_fitwrappedcauchy_fitzone_dwell

Dependencies:bootcircularclicpp11farverggplot2gluegtableisobandlabelinglifecyclemagrittrmvtnormpillarpkgconfigR6RColorBrewerrlangS7scalestibbleutf8vctrsviridisLitewithr

Guide for AI agents
Two ways in | Angle conventions | Coordinates and calibration | Map every column yourself | Time | Failures are information | Heading rules and attrition | Tests | Pitfalls

Last update: 2026-10-16
Started: 2026-10-13

Circular Statistics and Distribution Overlays
Overview | A heading data frame | Dispersion summaries | Parametric fits | Hypothesis tests | Uniformity | Equal mean directions | Equal concentrations | Model selection | Circular correlation | Circular regression | Distribution overlays | Per-group overlays | Significance geometry | Periodic data: time of day or year | Where next

Last update: 2026-10-16
Started: 2026-07-09

Quantifying path shape
Overview | Path length | Restricting to within the circumference | Straightness and tortuosity | Sinuosity | Goal-directed paths and zone occupancy | See also

Last update: 2026-10-16
Started: 2026-07-09

radiatR design contract
Rich objects, only where structure is irreducible | Everything else is a plain tibble, in and out | headings_frame: a dplyr-durable tibble subclass

Last update: 2026-10-16
Started: 2026-07-09

Working with Loaders
Overview | Loading a Real Experiment | Step 1 — discover files | Step 2 — read the manifest | Step 3 — extract and normalise trajectories | dtrack format | Tracking-tool format support | Bundled single-file examples | Reading Tabular Trajectories | Manifest Helpers (Synthetic Example) | Registering a Custom Dialect

Last update: 2026-10-16
Started: 2026-07-09

Readme and manuals

Help Manual

Help pageTopics
Add a rose diagram of heading angles to a radiate plotadd_angle_rose
Draw a circular guide.add_circ
Render a pre-computed circular interval arc on a radial plotadd_circ_interval
Render pre-computed circular mean arrows on a radial plotadd_circ_mean
Add a circular boxplot layer to a radial plotadd_circular_boxplot
Wrap a pre-computed circular density around the unit circleadd_circular_density
Overlay a non-parametric circular kernel density estimate on a radiate plotadd_circular_kde
Add a critical resultant-length circle to a radiate plotadd_critical_r
Add a V-test significance boundary to a radiate plotadd_critical_v_line
Compute a circular mean arrow and add it to a radial plot in one stepadd_heading_arrow
Compute a circular density and add it to a radial plot in one stepadd_heading_density
Compute a circular interval arc and add it to a radial plot in one stepadd_heading_interval
Add heading endpoint markers on the unit circleadd_heading_points
Add heading vector segments from inner crossing to unit circleadd_heading_vectors
Add a landmark marker to a circular plotadd_landmark
Add multiple concentric circles to a ggplot objectadd_multiple_circles
Mark the centre of a radial plotadd_origin_point
Add quadrant lines to a radial plotadd_quadrant_lines
Radial grid layers (the radial analogue of a Cartesian grid)add_radial_grid
Add stacked heading dots as a ggplot2 layeradd_stacked_headings
Add a stimulus arc to a circular plotadd_stimulus_arc
Create evenly spaced radial tick marks.add_ticks
Overlay a fitted von Mises density curve on a radiate plotadd_vonmises_density
Overlay a fitted wrapped Cauchy density curve on a radiate plotadd_wrappedcauchy_density
Per-observation angular (turning-rate) velocity for a Tracksangular_velocity
Apply a bespoke transformation to a Tracksapply_transform
Map periodic time, date, or numeric data onto circular anglesas_angle
Coerce a Tracks to a data frameas.data.frame.Tracks
Assign a shared colour-key column to a Tracks or data frameassign_color_key assign_colour_key
Assign cycling colour indices to trajectoriesassign_cycle_colors assign_cycle_colours
Snap angles to fixed-width circular bin centresbin_angles
Bootstrap confidence intervals for circular concentrationboot_kappa_ci
Bootstrap confidence interval for a between-condition concentration contrastboot_kappa_contrast
Bootstrap confidence interval for a mean directionboot_mean_ci
Circular boxplot statistics (Tukey-like, for circular and axial data)circ_boxplot_stats
Circular correlation between headings and a covariatecirc_cor
Per-group circular dispersion statistics for a dense heading seriescirc_dispersion
Circular display convention specificationcirc_display
Select among candidate circular models by AICccirc_model_select
Circular-linear regression of a heading on linear covariatescirc_regression fitted.circ_regression predict.circ_regression print.circ_regression summary.circ_regression
Tidy circular summary of a grouped data framecirc_summarise
Circular summary statistics for trajectoriescirc_summary circ_summary,Tracks-method
Circular statistics over derived headingscirc_summary_headings
Circular coordinate utilitiescircular_mapping
Label the circumference of a radial plot in domain unitscircumference_labs
Compute a circular interval arc from heading anglescompute_circ_interval
Compute circular mean direction and resultant length from a headings data framecompute_circ_mean
Compute a circular density data frame from heading observationscompute_circular_density
Von Mises regression of concentration on covariatesconcentration_regression fitted.concentration_regression predict.concentration_regression print.concentration_regression summary.concentration_regression
Count entries into a goal zone for trajectories in a circular fieldcount_goal_entries
*Cylindroiulus punctatus* visual orientation trajectory datasetcpunctatus
Cycle a bounded set of colour indices over the values of a keycycle_colors cycle_colours
Label the four diagonal directions.degree_labs
Derive polar and reference-relative coordinates from unit-circle positionderive_coords
Derive heading angle(s) from trajectories using specified rulederive_headings derive_headings,Tracks-method
Make mean resultant length arrowdirectedness_arrow
Distance calibration for a Tracks objectcalibrate_distance distance_scale distance_scale,Tracks-method distance_unit distance_unit,Tracks-method set_distance_scale set_distance_scale,Tracks-method
Elapsed time per observation of a Tracks objectelapsed_seconds
Fitted mean directions from a circular regression, for plottingfitted_directions
Frame rate of a Tracks objectframe_rate frame_rate,Tracks-method set_frame_rate set_frame_rate,Tracks-method
Aggregate track positions across all videos in a manifest.get_all_object_pos
Derive trial-level track positions in polar coordinates.get_tracked_object_pos
Summarise per-trial metadata for a single video.get_trial_limits
Plot trajectories from a Tracks (overlay or faceted)gg_traj gg_traj,Tracks-method
Guess the role of each column in a track tableguess_columns
Construct a headings frame from a data frame of anglesheadings_frame
Read the canonical attributes of a heading framehf_accessors hf_color_col hf_colour_col hf_coords hf_display hf_heading_col
Trajectory identifiers of a Tracksids ids,Tracks-method
Import landmark coordinates from text filesimport_info
Discover dtrack (or compatible) landmark/track file pairs in a directoryimport_tracks
Per-observation instantaneous speed for a Tracksinstantaneous_speed
Launch the radiatR Shiny companion applaunch_app
Find the intercept of a line with the unit circleline_circle_intercept
List registered custom heading ruleslist_heading_rules
List registered loader dialectslist_loader_dialects
List registered declarative formatslist_loader_formats
Load trajectories listed in a file table into a Tracksload_manifest
Sinuosity index for a single trajectorypath_sinuosity
Path straightness index for a single trajectorypath_straightness
Tortuosity ratio for a single trajectorypath_tortuosity
Kinematics profile plot for a Tracksplot_profile
Speed-vs-direction scatter for a Tracksplot_speed_direction
Speed distribution histogram for a Tracksplot_speed_histogram
Derive per-frame headings from pose data without a Trackspose_to_headings
Wrap angles to the interval (-pi, pi]rad_shepherd
Themes for radial track plots, named for the ggplot2 base themes.radial_theme
Make ggplot object of tracks radiating from circle centre.radiate radiate.default radiate.headings_frame radiate.Tracks
Construct a Tracks from a data.frame or file(s)read_tracks
Read all matching files from a directory and bind into a Tracksread_tracks_dir
Construct a Tracks from a *format* spec (registered name or inline list)read_tracks_format
Per-trajectory reference direction of a Tracksreference reference,Tracks-method
Register a custom heading derivation ruleregister_heading_rule
Register a custom loader dialectregister_loader_dialect
Register a declarative loader *format* (list or YAML/JSON file)register_loader_format
Restrict a Tracks to within the unit circlerestrict_to_circumference
Circumference scale: cardinal compass directionsscale_cardinal
Circumference scale: clock hoursscale_clock
Circumference scale: months of the yearscale_months
Circumference scale: seconds (or minutes)scale_seconds
Proportion of time spent in angular sectorssector_summary
Set the per-trajectory reference and re-derive the relative frameset_reference set_reference,Tracks-method
Simulate trajectory sets under configurable experimental conditionssimulate_tracks
Per-trajectory sinuosity for a Trackssinuosity
Add stacking columns to a headings data framestack_headings
Per-step speed along a trajectorystep_speed
Per-trajectory straightness index for a Tracksstraightness_index
Test whether groups share the same concentration (dispersion)test_concentration
Test whether groups share the same circular distributiontest_distributions
Goodness-of-fit test against a wrapped Cauchy distributiontest_gof
Test whether groups share the same mean directiontest_mean_directions
Test a circular distribution for reflective symmetrytest_symmetry
Per-group tests of circular uniformitytest_uniformity
Test a circular sample for unimodality against bimodalitytest_unimodality
Per-trajectory tortuosity ratio for a Trackstortuosity_ratio
Duration of each tracktrack_duration
Per-trajectory path length for a Trackstrack_length
Per-trajectory speed for a Tracks, in real unitstrack_speed
Per-trajectory turning-rate summary for a Trackstrack_turning
Per-trajectory net velocity for a Trackstrack_velocity
Tracks container for circular trajectoriesc,Tracks-method length,Tracks-method tracks Tracks-class [,Tracks,ANY,missing,missing-method
Transform history helpers for Tracks objectslog_transform log_transform,Tracks-method set_transform_history set_transform_history,Tracks-method transform_history transform_history,Tracks-method
Per-row movement directionvelocity_angle
Per-observation velocity vector for a Tracksvelocity_vector
Fit a von Mises distribution to per-group heading datavonmises_fit
Fit a wrapped Cauchy distribution to per-group heading datawrappedcauchy_fit
Dwell-time proportions across quadrant x ring zoneszone_dwell