Skip to content

Commit

Permalink
Be a bit more conservative in the rxPp example
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Oct 27, 2023
1 parent af4ab6c commit fc635c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions R/rxrandom.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ rxpois <- function(lambda, n = 1L, ncores = 1L) {
#' et <- et(1, id = 1:2)
#'
#' s <- rxSolve(rx, et)
#'
#'
#' }
#' @export
rxt <- function(df, n = 1L, ncores = 1L) {
Expand Down Expand Up @@ -312,7 +312,7 @@ rxbeta <- function(shape1, shape2, n = 1L, ncores = 1L) {
#' @return gamma random deviates
#'
#' @examples
#'
#'
#' \donttest{
#'
#' ## Use threefry engine
Expand Down Expand Up @@ -725,8 +725,9 @@ rxnbinomMu <- function(size, mu, n = 1L, ncores = 1L) {
#' ## This uses an arbitrary function to sample a non-homogenous Poisson process
#'
#' rxPp(10, 1 / 10, prob = function(x) {
#' 1 / x
#' 1/(1+abs(x))
#' })
#'
rxPp <- function(n, lambda, gamma = 1.0, prob = NULL, t0 = 0.0, tmax = Inf, randomOrder = FALSE) {
checkmate::assertNumeric(t0, len = 1, any.missing = FALSE)
checkmate::assertNumeric(tmax, len = 1, any.missing = FALSE, lower = t0)
Expand Down
3 changes: 2 additions & 1 deletion man/rxPp.Rd

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

0 comments on commit fc635c9

Please sign in to comment.