Package: mousetrap 3.2.3.9000

mousetrap: Process and Analyze Mouse-Tracking Data

Mouse-tracking, the analysis of mouse movements in computerized experiments, is a method that is becoming increasingly popular in the cognitive sciences. The mousetrap package offers functions for importing, preprocessing, analyzing, aggregating, and visualizing mouse-tracking data. An introduction into mouse-tracking analyses using mousetrap can be found in Wulff, Kieslich, Henninger, Haslbeck, & Schulte-Mecklenbeck (2023) <doi:10.31234/osf.io/v685r> (preprint: <https://osf.io/preprints/psyarxiv/v685r>).

Authors:Pascal J. Kieslich [aut, cre], Dirk U. Wulff [aut], Felix Henninger [aut], Jonas M. B. Haslbeck [aut], Sarah Brockhaus [ctb]

mousetrap_3.2.3.9000.tar.gz
mousetrap_3.2.3.9000.zip(r-4.5)mousetrap_3.2.3.9000.zip(r-4.4)mousetrap_3.2.3.9000.zip(r-4.3)
mousetrap_3.2.3.9000.tgz(r-4.4-x86_64)mousetrap_3.2.3.9000.tgz(r-4.4-arm64)mousetrap_3.2.3.9000.tgz(r-4.3-x86_64)mousetrap_3.2.3.9000.tgz(r-4.3-arm64)
mousetrap_3.2.3.9000.tar.gz(r-4.5-noble)mousetrap_3.2.3.9000.tar.gz(r-4.4-noble)
mousetrap_3.2.3.9000.tgz(r-4.4-emscripten)mousetrap_3.2.3.9000.tgz(r-4.3-emscripten)
mousetrap.pdf |mousetrap.html
mousetrap/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/pascalkieslich/mousetrap/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • KH2017 - Mouse-tracking dataset from Kieslich & Henninger
  • KH2017_raw - Raw mouse-tracking dataset from Kieslich & Henninger
  • mt_example - A mousetrap data object.
  • mt_example_raw - Raw mouse-tracking dataset for demonstrations of the mousetrap package
  • mt_prototypes - Mouse trajectory prototypes.

On CRAN:

analysisclusteringmouse-trackingvisualization

6.90 score 44 stars 112 scripts 977 downloads 4 mentions 51 exports 49 dependencies

Last updated 10 months agofrom:22217bf9b5. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 15 2024
R-4.5-win-x86_64OKOct 15 2024
R-4.5-linux-x86_64OKOct 15 2024
R-4.4-win-x86_64OKOct 15 2024
R-4.4-mac-x86_64OKOct 15 2024
R-4.4-mac-aarch64OKOct 15 2024
R-4.3-win-x86_64OKOct 15 2024
R-4.3-mac-x86_64OKOct 15 2024
R-4.3-mac-aarch64OKOct 15 2024

Exports:bezierbimodality_coefficientmt_add_trajectorymt_add_variablesmt_aggregatemt_aggregate_per_subjectmt_alignmt_align_startmt_align_start_endmt_anglesmt_animatemt_averagemt_bindmt_check_bimodalitymt_check_resolutionmt_clustermt_cluster_kmt_countmt_derivativesmt_deviationsmt_diffmapmt_distmatmt_exclude_finishmt_exclude_initiationmt_export_longmt_export_widemt_heatmapmt_heatmap_ggplotmt_heatmap_rawmt_import_longmt_import_mousetrapmt_import_widemt_length_normalizemt_mapmt_measuresmt_plotmt_plot_add_rectmt_plot_aggregatemt_plot_per_trajectorymt_plot_riverbedmt_remap_symmetricmt_resamplemt_reshapemt_sample_entropymt_scale_trajectoriesmt_spatializemt_standardizemt_subsetmt_time_normalizeread_mtscale_within

Dependencies:cliclustercolorspacecpp11cstabdiptestdotCall64dplyrfansifarverfastclusterfieldsgenericsggplot2glueGPArotationgtableisobandlabelinglatticelifecyclemagrittrmapsMASSMatrixmgcvmnormtmunsellnlmepillarpkgconfigpracmapsychpurrrR6RColorBrewerRcpprlangscalesspamstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Create Bezier-curves using the Bernstein approximation.bezier
Calculate bimodality coefficient.bimodality_coefficient
Mouse-tracking dataset from Kieslich & Henninger (2017)KH2017
Raw mouse-tracking dataset from Kieslich & Henninger (2017)KH2017_raw
Add new trajectory to trajectory array.mt_add_trajectory
Add new variables to trajectory array.mt_add_variables
Aggregate mouse-tracking data per condition.mt_aggregate
Aggregate mouse-tracking data per condition separately for each subject.mt_aggregate_per_subject
Align trajectories.mt_align
Align start position of trajectories.mt_align_start
Align start and end position of trajectories.mt_align_start_end
Calculate movement angles.mt_angles
Create gif trajectory animation.mt_animate
Average trajectories across intervals.mt_average
Join two trajectory arraysmt_bind
Assess bimodality of mouse-tracking measure distributions.mt_check_bimodality
Check logging resolution by looking at timestamp differences.mt_check_resolution
Cluster trajectories.mt_cluster
Estimate optimal number of clusters.mt_cluster_k
Count number of observations.mt_count
Calculate distance, velocity, and acceleration.mt_derivatives
Calculate deviations from idealized trajectory.mt_deviations
Creates a difference-heatmap of two trajectory heatmap images.mt_diffmap
Compute distance matrix.mt_distmat
A mousetrap data object.mt_example
Raw mouse-tracking dataset for demonstrations of the mousetrap packagemt_example_raw
Exclude phase without mouse movement at end of trial.mt_exclude_finish
Exclude initial phase without mouse movement.mt_exclude_initiation
Export mouse-tracking data.mt_export_long mt_export_wide
Plot trajectory heatmap.mt_heatmap
Plot trajectory heatmap using ggplot.mt_heatmap_ggplot
Creates high-resolution heatmap of trajectory data.mt_heatmap_raw
Import mouse-tracking data saved in long format.mt_import_long
Import mouse-tracking data recorded using the mousetrap plug-ins in OpenSesame.mt_import_mousetrap
Import mouse-tracking data saved in wide format.mt_import_wide
Length normalize trajectories.mt_length_normalize
Map trajectories to prototypes.mt_map
Calculate mouse-tracking measures.mt_measures
Plot trajectory data.mt_plot mt_plot_aggregate
Add rectangles to trajectory plot.mt_plot_add_rect
Create PDF with separate plots per trajectory.mt_plot_per_trajectory
Plot density of mouse positions across time steps.mt_plot_riverbed
Mouse trajectory prototypes.mt_prototypes
Create quantile-effect plotmt_qeffect
Remap mouse trajectories.mt_remap_symmetric
Resample trajectories using a constant time interval.mt_resample
General-purpose reshape and aggregation function for mousetrap data.mt_reshape
Calculate sample entropy.mt_sample_entropy
Standardize variables in mouse trajectory array.mt_scale_trajectories
Spatialize trajectories.mt_spatialize
Standardize mouse-tracking measures per level of other variables.mt_standardize
Filter mousetrap data.mt_subset
Time normalize trajectories.mt_time_normalize
Generic print for class mt_heatmap_rawprint.mt_heatmap_raw
Read MouseTracker raw data.read_mt
Scale and center variables within the levels of another variable.scale_within