Skip to main content

Installation

System Requirements

Prerequisites

# Install Xcode Command Line Tools
xcode-select --install

# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install dependencies
brew install mpfr gmp
brew install libomp  # For OpenMP support

Install qiprng

remotes::install_github("biostochastics/qiprng")

Verify Installation

library(qiprng)

# Check version
packageVersion("qiprng")

# Test basic functionality
createPRNG()
test_values <- generatePRNG(10)
print(test_values)
cleanupPRNG()

# Run validation tests
test_qiprng(quick = TRUE)

Troubleshooting

Ensure MPFR is installed and pkg-config can find it:
pkg-config --libs mpfr
If not found, set PKG_CONFIG_PATH:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
On macOS, explicitly install libomp:
brew install libomp
Then reinstall qiprng.
Ensure Rtools is properly configured:
pkgbuild::has_build_tools(debug = TRUE)