Skip to content

Commit

Permalink
pD => pV
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Sep 6, 2024
1 parent a8493d6 commit 392fa9a
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Description: Bayesian data analysis usually incurs long runtimes
For the underlying methodology, please refer
to the documentation of 'targets' <doi:10.21105/joss.02959> and 'JAGS'
(Plummer 2003) <https://www.r-project.org/conferences/DSC-2003/Proceedings/Plummer.pdf>.
Version: 1.2.0.9000
Version: 1.2.1
License: MIT + file LICENSE
URL: https://docs.ropensci.org/jagstargets/, https://github.com/ropensci/jagstargets
BugReports: https://github.com/ropensci/jagstargets/issues
Expand Down Expand Up @@ -68,6 +68,6 @@ SystemRequirements: JAGS 4.x.y (https://mcmc-jags.sourceforge.net)
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
VignetteBuilder: knitr
Config/testthat/edition: 3
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# jagstargets 1.2.0.9000 (development)

# jagstargets 1.2.1

* Return `pV` instead of `pD` in DIC info (#35).

# jagstargets 1.2.0

Expand Down
4 changes: 2 additions & 2 deletions R/tar_jags_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' to return: `"draws"` for MCMC samples (which could take up a lot of space)
#' `"summary"` for lightweight posterior summary statistics,
#' and `"dic"` for the overall deviance information criterion
#' and effective number of parameters
#' and effective number of parameters.
#' @param summaries List of summary functions passed to `...` in
#' `posterior::summarize_draws()` through `$summary()`
#' on the `CmdStanFit` object.
Expand Down Expand Up @@ -115,6 +115,6 @@ join_data_scalar <- function(text, data) {
tar_jags_df_dic <- function(fit) {
tibble::tibble(
dic = fit$BUGSoutput$DIC,
pD = fit$BUGSoutput$pD
pV = fit$BUGSoutput$pV
)
}
2 changes: 2 additions & 0 deletions man/tar_jags.Rd

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

2 changes: 1 addition & 1 deletion man/tar_jags_df.Rd

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

4 changes: 3 additions & 1 deletion man/tar_jags_rep.Rd

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

2 changes: 2 additions & 0 deletions man/tar_jags_rep_dic.Rd

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

2 changes: 2 additions & 0 deletions man/tar_jags_rep_draws.Rd

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

2 changes: 1 addition & 1 deletion man/tar_jags_rep_run.Rd

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

2 changes: 2 additions & 0 deletions man/tar_jags_rep_summary.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-tar_jags_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ targets::tar_test("tar_jags_df() with dic", {
# dic
dic <- tar_jags_df(out, data = data, "dic")
expect_equal(nrow(dic), 1)
expect_equal(sort(colnames(dic)), sort(c("dic", "pD")))
expect_true("dic" %in% colnames(dic))
# invalid output
expect_error(tar_jags_df(out, "nope"))
})

0 comments on commit 392fa9a

Please sign in to comment.