Install fastrerandomize

Set up the FastRerandomize package in a clean, hardware-aware workflow.

New to rerandomization? See the Tutorials "Key Concepts" box for the acceptance rule (M ≤ a), acceptance probability q, and design-respecting inference.

Install fastrerandomize

To install and load fastrerandomize, follow these steps:

  1. Open your preferred R editor.

  2. If you haven't installed devtools already, begin by doing so:

    install.packages("devtools")
  3. Install the latest package version from GitHub (a CRAN version is also available):

    devtools::install_github("cjerzak/fastrerandomize-software", subdir = "fastrerandomize")
  4. Load the package:

    library(fastrerandomize)
  5. When running code for the first time, create the computational environment:

    fastrerandomize::build_backend()
  6. Rerandomize!

Installation Tips

  • Ensure you have R version 4.3 or higher installed.
  • System requirements: Python 3.11+ plus reticulate, JAX/JAXLIB, and NumPy (installed by the backend).
  • build_backend() creates a minimal conda environment and selects CPU/GPU/TPU automatically.
  • If you encounter any errors during installation, open an issue on GitHub.
  • For GPU acceleration, ensure compatible CUDA (NVIDIA) or Metal (Apple) drivers are installed.

Citation

Reference the SoftwareX article

Connor T. Jerzak, Rebecca Goldstein, Aniket Kamat, and Fucheng Warren Zhu. FastRerandomize: An R Package for Fast Rerandomization Using Accelerated Computing. SoftwareX, 2026.

@article{jerzak2025fastrerandomize,
  title={FastRerandomize: An R Package for Fast Rerandomization Using Accelerated Computing},
  author={Jerzak, Connor T. and Rebecca Goldstein and Aniket Kamat and Fucheng Warren Zhu},
  journal={SoftwareX},
  year={2026}
}

What's Next?

Read Documentation

Explore the comprehensive documentation to learn about all the features and functions available.

View Docs

Follow Tutorials

Work through our step-by-step tutorials to get familiar with rerandomization techniques.

Start Learning

View Examples

Check out example code snippets and real-world applications to jumpstart your projects.

See Examples