Skip to content

Commit

Permalink
...names() available only since 4.1.0 (issue #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Nov 1, 2021
1 parent 2043b3a commit 456ddd1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: fmcmc
Title: A friendly MCMC framework
Version: 0.5-0
Date: 2021-07-14
Date: 2021-09-02
Authors@R: c(person("George", "Vega Yon", email = "[email protected]", role =
c("aut", "cre"), comment = c(ORCID = "0000-0002-3171-0844")),
person("Paul", "Marjoram", email = "[email protected]", role = c("ctb",
Expand Down
12 changes: 6 additions & 6 deletions R/mcmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@
#' ub = 5,
#' scale = 0.01
#' ),
#' nsteps = 1e4,
#' thin = 20,
#' burnin = 5e3
#' nsteps = 1e3,
#' thin = 10,
#' burnin = 5e2
#' )
#'
#' # Checking out the outcomes
Expand Down Expand Up @@ -237,9 +237,9 @@
#' ub = 5,
#' scale = 0.01
#' ),
#' nsteps = 1e4,
#' thin = 20,
#' burnin = 5e3,
#' nsteps = 1e3,
#' thin = 10,
#' burnin = 5e2,
#' D = D
#' )
#'
Expand Down
7 changes: 4 additions & 3 deletions R/mcmc_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ MCMC_init <- function(...) {
assign(n, get(n, envir = env), envir = MCMC_OUTPUT$info)

# Assigning dots
for (i in seq_len(...length())) {
assign(...names()[i], ...elt(i), envir = MCMC_OUTPUT$info)
}
dotnames <- names(list(...))

for (i in seq_len(...length()))
assign(dotnames[i], ...elt(i), envir = MCMC_OUTPUT$info)

invisible(NULL)

Expand Down
12 changes: 6 additions & 6 deletions man/MCMC.Rd

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

2 changes: 1 addition & 1 deletion vignettes/advanced-features.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Another thing the user may need to do is storing data as the MCMC algorithm runs
In such cases, you can use the `set_userdata()` function, which, as the name suggests,
will store the required data.

For a simple example, suppose we wanted to store the state, we could do it in the
For a simple example, suppose we wanted to store the proposed state, we could do it in the
following way:

```{r lupost4}
Expand Down

0 comments on commit 456ddd1

Please sign in to comment.