Skip to content

Commit

Permalink
Update website, README.Rmd and DESCRIPTION file
Browse files Browse the repository at this point in the history
  • Loading branch information
prdm0 committed Apr 9, 2024
1 parent 1887c86 commit 39059a4
Show file tree
Hide file tree
Showing 24 changed files with 72 additions and 35 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
^img$
^logo\.png$
^pkgdown$
^doc$
^Meta$
^CRAN-SUBMISSION$
^cran-comments\.md$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
.httr-oauth
.DS_Store
.quarto
/doc/
/Meta/
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.1.0
Date: 2024-04-09 12:46:41 UTC
SHA: 1887c8683f4223991bb88bf5ee95a2c4e48c2f1b
10 changes: 7 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ Authors@R: c(
person("Vera Lucia Damasceno", "Tomazella", , "vera@ufscar.br", role = c("aut"),
comment = c(ORCID = "0000-0002-6780-2089"))
)
Description: The package provides a function that implements the acceptance-rejection method in an optimized manner to generate pseudo-random observations for discrete or continuous random variables. The function is optimized to work in parallel on Unix-based operating systems (Linux and MacOS) 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.
Description: Provides a function that implements the acceptance-rejection method in an optimized manner to generate pseudo-random observations for discrete or continuous random variables. 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.
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
URL: https://prdm0.github.io/AcceptReject
BugReports: https://github.com/prdm0/AcceptReject/issues
URL: https://prdm0.github.io/AcceptReject/
BugReports: https://github.com/prdm0/AcceptReject/issues/
RoxygenNote: 7.2.3
VignetteBuilder: knitr
Imports:
lbfgs,
numDeriv,
pbmcapply,
purrr,
rlang
Suggests:
knitr,
rmarkdown
4 changes: 4 additions & 0 deletions R/accept_reject.r
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
#'
#' @seealso [parallel::mclapply()] and [lbfgs::lbfgs()].
#'
#' @references CASELLA, George; ROBERT, Christian P.; WELLS, Martin T. Generalized accept-reject sampling schemes. Lecture Notes-Monograph Series, p. 342-347, 2004.
#' @references NEAL, Radford M. Slice sampling. The annals of statistics, v. 31, n. 3, p. 705-767, 2003.
#' @references BISHOP, Christopher. 11.4: Slice sampling. Pattern Recognition and Machine Learning. Springer, 2006.
#'
#' @examples
#' set.seed(0) # setting a seed for reproducibility
#'
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ Since the probability of acceptance is $1/c$, the `AcceptReject::accept_reject()

## Installation

The package is being versioned on GitHub. You can install the development version of [AcceptReject](https://github.com/prdm0/AcceptReject), and to do this, you must first install the [remotes](https://cran.r-project.org/web/packages/remotes/index.html) package and then run the following command:
The package is being versioned on GitHub. You can install the development version of [AcceptReject](https://github.com/prdm0/AcceptReject), and to do this, you must first install the [remotes](https://CRAN.R-project.org/package=remotes) package and then run the following command:

``` r
# install.packages("remotes")
remotes::install_github("prdm0/AcceptReject", force = TRUE)
# or remotes::install_github("prdm0/AcceptReject", force = TRUE)
library(AcceptReject)
```

The `force = TRUE` argument is not necessary. It is only needed in situations where you have already installed the package and want to reinstall it to have a new version.

## Examples

Please note the examples below on how to use the `AcceptReject::accept_reject()` function to generate pseudo-random observations of discrete and continuous random variables. For further details, refer to the function's documentation [**Reference**](reference/index.html) and the [**Vignette**](articles/accept_reject.htmll).
Please note the examples below on how to use the `AcceptReject::accept_reject()` function to generate pseudo-random observations of discrete and continuous random variables. For further details, refer to the function's documentation [**Reference**](reference/index.html) and the [**Vignette**](articles/accept_reject.html).

### Generating discrete observations

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ The package is being versioned on GitHub. You can install the
development version of
[AcceptReject](https://github.com/prdm0/AcceptReject), and to do this,
you must first install the
[remotes](https://cran.r-project.org/web/packages/remotes/index.html)
package and then run the following command:
[remotes](https://CRAN.R-project.org/package=remotes) package and then
run the following command:

``` r
# install.packages("remotes")
remotes::install_github("prdm0/AcceptReject", force = TRUE)
# or remotes::install_github("prdm0/AcceptReject", force = TRUE)
library(AcceptReject)
```

Expand All @@ -98,7 +98,7 @@ Please note the examples below on how to use the
observations of discrete and continuous random variables. For further
details, refer to the function’s documentation
[**Reference**](reference/index.html) and the
[**Vignette**](articles/accept_reject.htmll).
[**Vignette**](articles/accept_reject.html).

### Generating discrete observations

Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
template:
bootstrap: 5
bootswatch: litera
params:
mathjax: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
16 changes: 8 additions & 8 deletions docs/articles/accept_reject.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/accept_reject_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39059a4

Please sign in to comment.