Skip to content

AcceptReject

0.1.2Package record

Acceptance-Rejection Method for Generating Pseudo-Random Observations

0packages depend
8Kdownloads / year
62.1%test coverage
13/13flavors OK

Overview

About

Provides a function that implements the acceptance-rejection method in an optimized manner to generate pseudo-random observations for discrete or continuous random variables. Proposed by von Neumann J. (1951), https://mcnp.lanl.gov/pdf_files/, the function is optimized to work in parallel on Unix-based operating systems and performs well on Windows systems. The acceptance-rejection method implemented optimizes the probability of generating observations from the desired random variable, by simply providing the probability function or probability density function, in the discrete and continuous cases, respectively. Implementation is based on references CASELLA, George at al. (2004) https://www.jstor.org/stable/4356322, NEAL, Radford M. (2003) https://www.jstor.org/stable/3448413 and Bishop, Christopher M. (2006, ISBN: 978-0387310732).

Changes in 0.1.2
  • The performance of the one_step() function, an internal function used in the implementation of C++ using Rcpp, has been improved;
  • The method qqplot.accept_reject() has been added, which constructs the QQ-Plot of an object of class accept_reject returned by the function accept_reject();
  • The qqplot.accept_reject() function utilizes the **scattermore** package if the point density is high, i.e., above 10 thousand observations;
  • The function accept_reject() now has the argument cores, which allows the user to control the number of cores that will be used if parallel = TRUE. The default, cores = NULL, means that all processor cores will be used. If parallel = FALSE, the cores argument is ignored;
  • The DESCRIPTION file was edited;
  • Another bibliographic reference was added to the accept_reject() function;
  • The dependency on the lbfgs package has been removed;
  • New unit tests have been introduced;
  • Bug fix.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.3 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-04-22
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.1.2
READMEYes · 1,298 wordsVignettesYes · 3 · dynamicNEWSYes · 67% structured · mentions 0.1.2Citation fileNoWebsiteYes · pkgdown
Help pages
6
Examples that run
100%5 run in a plain check
Exported functions with examples
67%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
17%

Downloads

8K
CRAN downloads in the past year
Rank #4,874 · ~22/day · ~669/mo
Daily download trend is not available in this view yet.
54930 days
1.7K90 days
8K1 year
Compare downloads with other packages →
Also on384 r2u36 autocran

Repository

2Stars
0Forks
0Open issues
0Open PRs
0Releases
68Commits
1Commit identities
monte-carlomonte-carlo-simulationpackagerrejection-samplingrstatsstatistics-library
License file reads as GPL-3.0 · 68 commits · Last activity 2024-05-22 · 0% stars, 30d
Responsiveness
not measured

Stars over time

2025-09-19 · 22026-07-07 · 2
PracticesBeta

9 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/prdm0/acceptreject on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2024-05-22 · The repository has a site deploy workflow

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing AcceptReject adds 24 packages (12 with compiled code, 17 MB of source tarballs). Heaviest: ggplot2 6.0 MB, Rcpp 1.8 MB, isoband 1.5 MB.

Depends (0)
none
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 0.1.0 (2024)
Releases (3)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.2Latest
    record
    2024-05-07 · current release · diff ↗ ·
    added 1 export
    qqplot
  • 0.1.1
    record
    2024-04-24 · diff ↗ ·
    added 1 export
    inspect
  • R
    R 4.4.0 released · 2024-04-24
  • 0.1.0
    record
    2024-04-11
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2024-04-11
Total releases
3 / 2 yrs
License
GPL (>= 3) OSI
Download size
721 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("AcceptReject")
Marinho, P. R. D., & Tomazella, V. L. D. (2024). AcceptReject: Acceptance-Rejection Method for Generating Pseudo-Random Observations (Version 0.1.2) [Computer software]. https://doi.org/10.32614/CRAN.package.AcceptReject

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for AcceptReject version 0.1.2 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy