Skip to content

Commit 18afadc

Browse files
committed
Minor updates after CRAN review
1 parent ae81629 commit 18afadc

File tree

13 files changed

+50
-5
lines changed

13 files changed

+50
-5
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: nimbleMacros
2-
Version: 0.1.0
3-
Date: 2025-03-05
2+
Version: 0.1.1
3+
Date: 2025-03-10
44
Title: Macros Generating 'nimble' Code
55
Authors@R: c(person("Ken", "Kellner", email="contact@kenkellner.com",
66
role=c("cre","aut")),
@@ -16,7 +16,7 @@ Suggests:
1616
knitr,
1717
markdown,
1818
testthat
19-
Description: Macros to generate 'nimble' code from a concise syntax. Included are macros for generating linear modeling code using a formula-based syntax and for 'for' loops.
19+
Description: Macros to generate 'nimble' code from a concise syntax. Included are macros for generating linear modeling code using a formula-based syntax and for building for() loops. For more details review the 'nimble' manual: <https://r-nimble.org/html_manual/cha-writing-models.html#subsec:macros>.
2020
License: BSD_3_clause + file LICENSE | GPL (>= 2)
2121
NeedsCompilation: no
2222
URL: https://r-nimble.org

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# unmarked 0.1.1
2+
3+
* Add URL to DESCRIPTION
4+
* Add return value tags to documentation
5+
6+
# nimbleMacros 0.1.0
7+
8+
* Initial release

R/FORLOOP.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#' @param modelInfo Used internally by nimbleMacros; a list of model information such as constants and dimensions
1414
#' @param .env Used internally by nimbleMacros; the environment where the model was created
1515
#'
16+
#' @return NIMBLE code for a for loop or series of nested for loops.
17+
#'
1618
#' @examples
1719
#' code <- nimbleCode({
1820
#' y[1:n, 1:2, 1] ~ FORLOOP(dnorm(mu[1:n], sigma))

R/LINPRED.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#' @param modelInfo Used internally by nimbleMacros; a list of model information such as constants and dimensions
4141
#' @param .env Used internally by nimbleMacros; the environment where the model was created
4242
#'
43+
#' @return NIMBLE code for the linear predictor specified by the formula, and optionally the associated priors.
44+
#'
4345
#' @author Ken Kellner
4446
#'
4547
#' @examples
@@ -144,7 +146,9 @@ unpackArgs=TRUE
144146
#' is unrelated to the \code{noncentered} argument despite the similar names.
145147
#' @param modelInfo Used internally by nimbleMacros; a list of model information such as constants and dimensions
146148
#' @param .env Used internally by nimbleMacros; the environment where the model was created
147-
#'
149+
#'
150+
#' @return NIMBLE code for the priors specified by the formula.
151+
#'
148152
#' @author Ken Kellner
149153
#'
150154
#' @examples
@@ -1433,8 +1437,10 @@ correlatedRandomPrior <- function(x, priorSpecs, sdPrefix, sd_name, modelInfo, c
14331437
#' @param mat upper triangular Cholesky factor of correlation matrix ("Ustar")
14341438
#' @param vec vector of standard deviations for individual random effects
14351439
#'
1440+
#' @return The upper triangular Cholesky factor of the covariance matrix.
1441+
#'
14361442
#' @name uppertri_mult_diag
1437-
1443+
#'
14381444
#' @importFrom nimble nimMatrix
14391445
#' @export
14401446
uppertri_mult_diag <- nimbleFunction(

R/LM.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#' @param modelInfo Used internally by nimbleMacros; a list of model information such as constants and dimensions
2828
#' @param .env Used internally by nimbleMacros; the environment where the model was created
2929
#'
30+
#' @return NIMBLE code for the linear model, GLM, or GLMM specified by the formula, including priors.
31+
#'
3032
#' @author Ken Kellner
3133
#'
3234
#' @examples

R/setPriors.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#' correlation matrix in correlated random slope and intercept models
2020
#' @param ... Specific parameters, optionally with brackets/indices
2121
#'
22+
#' @return A named list of prior specifications to be passed to the \code{priors}
23+
#' argument of other macros in the package, such as \code{LINPRED}.
24+
#'
2225
#' @seealso [nimble::dlkj_corr_cholesky] for more on the LKJ distribution
2326
#'
2427
#' @details
@@ -122,6 +125,8 @@ removeBracket <- function(node){
122125
#' @param priors A named list of prior settings, e.g., as generated by
123126
#' \code{setPriors}
124127
#'
128+
#' @return NIMBLE code for the matching prior.
129+
#'
125130
#' @author Ken Kellner
126131
#'
127132
#' @examples

man/FORLOOP.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/LINPRED.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/LINPRED_PRIORS.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/LM.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)