From e07c5a9b26dbd376388cf93ff77289490bf8019c Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Thu, 25 Jan 2024 21:25:30 -0600 Subject: [PATCH] Fix rxSetSeed --- DESCRIPTION | 2 +- R/RcppExports.R | 22 +++++++++++----------- R/rxrandom.R | 2 +- man/rxSetSeed.Rd | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7a4928e..e2b58a3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,4 +37,4 @@ Encoding: UTF-8 Language: en-US NeedsCompilation: yes Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/R/RcppExports.R b/R/RcppExports.R index 58ab7df..ae2c0cf 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -4,14 +4,14 @@ #' Scaled Inverse Chi Squared distribution #' #' @param n Number of random samples -#' +#' #' @param nu degrees of freedom of inverse chi square -#' -#' @param scale Scale of inverse chi squared distribution +#' +#' @param scale Scale of inverse chi squared distribution #' (default is 1). -#' +#' #' @return a vector of inverse chi squared deviates. -#' +#' #' @examples #' rinvchisq(3, 4, 1) ## Scale = 1, degrees of freedom = 4 #' rinvchisq(2, 4, 2) ## Scale = 2, degrees of freedom = 4 @@ -23,16 +23,16 @@ rinvchisq <- function(n = 1L, nu = 1.0, scale = 1) { #' One correlation sample from the LKJ distribution #' #' @param d The dimension of the correlation matrix -#' +#' #' @param eta The scaling parameter of the LKJ distribution. #' Must be > 1. Also related to the degrees of freedom nu. #' eta = (nu-1)/2. -#' +#' #' @param cholesky boolean; If `TRUE` return the cholesky #' decomposition. #' #' @return A correlation sample from the LKJ distribution -#' +#' #' @author Matthew Fidler (translated to RcppArmadillo) and Emma Schwager #' @export #' @keywords internal @@ -54,13 +54,13 @@ rLKJcvLsd1 <- function(logSd, logSdSD, eta = 1.0) { #' random covariate to a correlation. #' #' @inheritParams rLKJ1 -#' +#' #' @param nu Degrees of freedom of the Wishart distribution -#' +#' #' @inheritParams cvPost #' #' @return One correlation sample from the inverse wishart -#' +#' #' @author Matthew Fidler #' @keywords internal #' @export diff --git a/R/rxrandom.R b/R/rxrandom.R index d8c8ab2..19612bf 100644 --- a/R/rxrandom.R +++ b/R/rxrandom.R @@ -951,7 +951,7 @@ cvPost <- function(nu, omega, n = 1L, omegaIsChol = FALSE, returnChol = FALSE, #' @references #' #' JD Cook. (2016). Random number generator seed mistakes. -#' \url{https://tinyurl.com/m62v3kv9} +#' \url{https://www.johndcook.com/blog/2016/01/29/random-number-generator-seed-mistakes/} #' #' @export rxSetSeed <- function(seed) { diff --git a/man/rxSetSeed.Rd b/man/rxSetSeed.Rd index 10e69a9..f100758 100644 --- a/man/rxSetSeed.Rd +++ b/man/rxSetSeed.Rd @@ -80,7 +80,7 @@ rnorm(1) } \references{ JD Cook. (2016). Random number generator seed mistakes. -\url{https://tinyurl.com/m62v3kv9} +\url{https://www.johndcook.com/blog/2016/01/29/random-number-generator-seed-mistakes/} } \seealso{ rxGetSeed, rxWithSeed, rxWithPreserveSeed