Skip to content

Commit

Permalink
Version 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
prdm0 committed Apr 30, 2024
1 parent 6c525f1 commit 6a670bc
Show file tree
Hide file tree
Showing 46 changed files with 89 additions and 105 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
URL: https://prdm0.github.io/AcceptReject/
BugReports: https://github.com/prdm0/AcceptReject/issues/
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Imports:
assertthat,
Expand Down
4 changes: 2 additions & 2 deletions R/accept_reject.r
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ accept_reject <-

if (warning && f(xlim[2L]) > 0.01) {
cli::cli_alert_warning(
glue::glue("Warning: f({xlim[2L]}) is {f(xlim[2L])}. If f is defined for x >= f({xlim[2L]}), trying a upper limit might be better.")
glue::glue("Warning: f({xlim[2L]}) is {f(xlim[2L])}. If f is defined for x >= {xlim[2L]}, trying a upper limit might be better.")
)
}

if (warning && xlim[1L] < 0 && f(xlim[1L]) > 0.01) {
cli::cli_alert_warning(
glue::glue("Warning: f({xlim[1L]}) is {f(xlim[1L])}. If f is defined for x <= f({xlim[1L]}), trying a lower limit might be better.")
glue::glue("Warning: f({xlim[1L]}) is {f(xlim[1L])}. If f is defined for x <= {xlim[1L]}, trying a lower limit might be better.")
)
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ case_1 <- accept_reject(
xlim = c(0, 6)
)
toc()
#> 0.01 sec elapsed
#> 0.008 sec elapsed

# Specifying the base probability density function
tic()
Expand All @@ -377,7 +377,7 @@ case_2 <- accept_reject(
c = 1.2
)
toc()
#> 0.004 sec elapsed
#> 0.005 sec elapsed

# Visualizing the results
p1 <- plot(case_1)
Expand Down
10 changes: 4 additions & 6 deletions docs/404.html

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

8 changes: 4 additions & 4 deletions docs/LICENSE.html

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

Loading

0 comments on commit 6a670bc

Please sign in to comment.