Package: transitiontrees 0.1.2

Mohammed Saqr

transitiontrees: Transition Trajectories and Dynamics of Variable-Length Pathways or Sequences

Analyzes transition trajectories in event, sequence, and ordered data, focusing on how states follow one another, how far processes unfold, and where pathways branch or converge. Trajectories are modeled using variable-order prediction suffix trees (Ron, Singer, & Tishby, 1996) <doi:10.1023/A:1026490906255>, implemented in both frequency-based and prediction-based forms. The framework includes multiple pruning, validation, and smoothing techniques to ensure model robustness. Visualization options include transition trees, radial sunburst diagrams, transition heatmaps, and forward trajectory trees.

Authors:Mohammed Saqr [aut, cre, cph], Sonsoles López-Pernas [aut]

transitiontrees_0.1.2.tar.gz
transitiontrees_0.1.2.tar.gz(r-4.7-any)transitiontrees_0.1.2.tar.gz(r-4.6-any)
transitiontrees_0.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
transitiontrees/json (API)
NEWS

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

Bug tracker:https://github.com/mohsaqr/transitiontrees/issues

Datasets:

On CRAN:

Conda:

3.40 score 36 exports 17 dependencies

Last updated from:037bd79833. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK163
source / vignettesOK356
linux-release-x86_64OK185
wasm-releaseOK116

Exports:bootstrap_pathwayscommon_pathwayscompare_groupscompare_pruningcompare_smoothingcompare_treescontext_treedivergent_pathwaysgenerate_sequencesimpute_sequencesmine_contextsmine_sequencesmodel_fitn_nodespathway_existsperplexityplot_differenceplot_distributionsplot_divergenceplot_pathway_resamplesplot_pathwaysplot_predictiveplot_pruningplot_trajectoriesprepare_inputprune_treequery_pathwayscore_positionsscore_sequencessharp_pathwayssmooth_treesubtreetree_dependencetree_distancetree_pathwaystune_tree

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

Getting started: basic analysis and trajectory trees

Rendered fromgetting-started.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-18

A complete analysis case: collaborative-regulation sequences

Rendered fromanalysis-case.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-18

Ecosystem compatibility: TraMineR, tna, and Nestimate

Rendered fromecosystem-compatibility.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-18

Advanced analysis: smoothing, tuning, comparison, and mining

Rendered fromadvanced-analysis.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-18

Visualization: every plot, and how to read it

Rendered fromvisualization.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-18

Readme and manuals

Help Manual

Help pageTopics
AI-collaboration messages (long format)ai_long
Coerce a context tree to a Tidy Data Frameas.data.frame.transitiontrees
Coerce a context tree Bootstrap to a Tidy Data Frameas.data.frame.transitiontrees_bootstrap
Coerce a context tree Comparison to a Tidy Data Frameas.data.frame.transitiontrees_comparison
Coerce a Group of Trees to One Tidy Data Frameas.data.frame.transitiontrees_group
Coerce a Group Comparison to a Tidy Data Frameas.data.frame.transitiontrees_group_comparison
Bootstrap Pathway Stability and Informativenessbootstrap_pathways
Most Common Pathways in a Fitted Treecommon_pathways
Compare Groups of Sequences for Structural Differencescompare_groups
Compare Pruning Criteria on One Treecompare_pruning
Compare Smoothing Schemes on One Datasetcompare_smoothing
Compare Two context trees by Symmetric Divergence with Permutation Testcompare_trees
Fit a Prediction Suffix Tree from Categorical Sequence Datacontext_tree
Most Predictively Divergent Pathwaysdivergent_pathways
Student engagement state sequences (wide format)engagement
Sample Sequences from a Fitted Context Treegenerate_sequences
Collaborative-regulation events (long format)group_regulation_long
Impute Missing States in Sequencesimpute_sequences
Log-Likelihood of a context treelogLik.transitiontrees
Mine Contexts by Next-State Probabilitymine_contexts
Mine Sequences by Predictive Surprisemine_sequences
Model-Fit Scalars in One Callmodel_fit
Number of Contexts (Nodes) in a Treen_nodes
Number of Observations Used to Fit a context treenobs.transitiontrees
Test Whether a Pathway Exists in the Treepathway_exists
Perplexity of a context treeperplexity
Difference (Subtraction) Map Between Two Groupsplot_difference
Per-Context Next-State Distributionsplot_distributions
Lollipop Chart of Pathway Divergenceplot_divergence
Plot Bootstrap Resample Distributions per Pathwayplot_pathway_resamples
Plot Pathways as a Probability Heatmapplot_pathways
Predictive Diagnostics for Held-Out Scoringplot_predictive
Illustrate Pruning Along a Pathway's Suffix Chainplot_pruning
Forward Trajectory Tree (Prefix Tree)plot_trajectories
Plot a Context Treeplot.transitiontrees
Plot a context tree Bootstrapplot.transitiontrees_bootstrap
Plot a context tree Comparisonplot.transitiontrees_comparison
Plot Each Tree in a context tree Groupplot.transitiontrees_group
Plot a Group Comparisonplot.transitiontrees_group_comparison
Plot a context tree CV Gridplot.transitiontrees_tune
Predict Next-State Probabilities from a Context Treepredict.transitiontrees
Reshape Long Event Data into a Wide Sequence Frameprepare_input
Print a Context-Tree Summaryprint.summary.transitiontrees
Print a Context Treeprint.transitiontrees
Print a context tree Bootstrapprint.transitiontrees_bootstrap
Print a context tree Comparisonprint.transitiontrees_comparison
Print a Group of Context Treesprint.transitiontrees_group
Print a Group Comparisonprint.transitiontrees_group_comparison
Print a context tree Tuning Gridprint.transitiontrees_tune
Prune a Context Treeprune_tree
Query the Probability of a Specific Pathway -> Next Statequery_pathway
Per-Position Scoringscore_positions
Per-Sequence Scoringscore_sequences
Sharpest Pathwayssharp_pathways
Simulate Sequences from a Fitted context treesimulate.transitiontrees
Re-Smooth a Fitted context treesmooth_tree
Extract the Subtree Rooted at a Pathwaysubtree
Summary of a Context Treesummary.transitiontrees
Summarise a context tree Bootstrapsummary.transitiontrees_bootstrap
Summarise a Group Comparisonsummary.transitiontrees_group_comparison
Student engagement trajectoriestrajectories
Per-Context Path Dependence of a Context Treetree_dependence
Symmetric KL Distance Between Two context treestree_distance
Pathways from a Fitted Treetree_pathways
Cross-Validated Hyperparameter Tuning for context treestune_tree