---
title: "The TRexSelector R package"
output:
  rmarkdown::html_vignette:
    toc: true
    css: vignette_styles.css
    includes:
      before_body: vignette_nav.html
bibliography: references.bib
csl: ieee.csl
link-citations: true
vignette: >
  %\VignetteIndexEntry{The TRexSelector R package}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

**Fast variable selection in high-dimensional settings with control of the false discovery rate (FDR).**

The R package of the Terminating-Random Experiments (T-Rex) selector, with bindings to the
[TRexSelector C++ library](https://github.com/trexselector/TRexSelector). The
[Python package](https://pypi.org/project/trexselector/) binds the same library. The vignettes walk
through the package with code that runs when they are built, so every output shown is the output of the
code above it, and the reference manual describes every class and function from its help page. The user
guides of the Python package and the C++ library present the same content page for page.

The method family grows within a series of papers, among which the following three form the theoretical
core of the framework so far:

> J. Machkour, M. Muma, and D. P. Palomar, "The terminating-random experiments selector: Fast
> high-dimensional variable selection with false discovery rate control," *Signal Processing*,
> vol. 231, article 109894, 2025. (<https://doi.org/10.1016/j.sigpro.2025.109894>)
>
> J. Machkour, M. Muma, and D. P. Palomar, "High-dimensional false discovery rate control for
> dependent variables," *Signal Processing*, vol. 234, article 109990, 2025.
> (<https://doi.org/10.1016/j.sigpro.2025.109990>)
>
> T. Koka, J. Machkour, D. P. Palomar, and M. Muma, "Virtual dummies: Enabling scalable FDR-controlled
> variable selection via sequential sampling of null features," arXiv:2604.07464, 2026.
> (<https://arxiv.org/abs/2604.07464>)

# User guide

1. [Getting started](v01-getting-started.html)
2. [Data dimensionality and FDR control](v02-dimensionality.html)
3. [The T-Rex selector](v03-trex-selector.html)
4. [T-Rex+DA](v04-trex-da.html)
5. [T-Rex GVS](v05-trex-gvs.html)
6. [Screen-T-Rex](v06-screening.html)
7. [T-Rex SPCA](v07-trex-spca.html)
8. [T-Rex Tikhonov](v08-trex-tikhonov.html)
9. [The T-solvers](v09-tsolvers.html)
10. [The ML methods](v10-ml-methods.html)
11. [Memory mapping](v11-memory-mapping.html)
12. [Without data copies](v12-no-copies.html)
13. [Parallelism](v13-parallelism.html)

Every page is a vignette of the package. `browseVignettes("TRexSelector")` lists them together with
this overview, and `vignette("v01-getting-started")` opens a page in the viewer of the R session. The
pages cite the literature, and every page ends with its bibliography. The vignettes are built with knitr
[@xie2015knitr] and rmarkdown [@xie2018rmarkdown], and their figures are drawn with ggplot2
[@wickham2016ggplot2].

# Reference

- The [reference manual](https://CRAN.R-project.org/package=TRexSelector/TRexSelector.pdf) on CRAN
  collects the help pages of the classes and functions in one document.
- `help(package = "TRexSelector")` lists the help pages of the installed package, and the left pane links
  them when the page is read from an installed package.
- The [sources](https://github.com/trexselector/TRexSelector/tree/main/R/TRexSelector) of the package on
  GitHub.
- [OpenMP on your platform](https://github.com/trexselector/TRexSelector/blob/main/OPENMP.md), how each
  package gets its threads on Windows, Linux and macOS.
- [T-Rex publications](https://github.com/trexselector/TRexSelector/blob/main/PUBLICATIONS.md), every
  paper of the method family, journal articles, conference papers, theses and preprints.
- `citation("TRexSelector")` gives the package entry and the method papers.

# Links

- Project website: <https://trexselector.com>
- Repository of the C++ core and the R and Python packages: <https://github.com/trexselector/TRexSelector>
- Examples in R, Python and C++: <https://github.com/trexselector/TRexSelector_Examples>
- Bug reports: <https://github.com/trexselector/TRexSelector/issues>
- Team T-Rex, the authors and their contact: <https://github.com/trexselector/TRexSelector/blob/main/AUTHORS.md>

# Bibliography
