Skip to content

Commit

Permalink
making function 'devAskNewPage' available for 'plot.brmsfit'
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Jun 29, 2015
1 parent aa02a64 commit a1b83cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.Rproj.user
.Rhistory
.RData
brm.txt
brm.txt
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Date: 2015-06-29
Authors@R: person("Paul-Christian", "Buerkner", email = "[email protected]",
role = c("aut", "cre"))
Depends: R (>= 3.1.0), ggplot2 (>= 1.0.1), Rcpp (>= 0.11.5)
Imports: methods, stats, abind, parallel (>= 3.1.3), coda (>= 0.17-1), ggmcmc (>= 0.6), gridExtra (>= 0.9.1)
Imports: methods, stats, grDevices, abind, parallel (>= 3.1.3), coda (>= 0.17-1), ggmcmc (>= 0.6), gridExtra (>= 0.9.1)
Suggests: rstan (>= 2.6.0), R2jags (>= 0.05-03), testthat (>= 0.9.1)
Description: Fit Bayesian generalized linear mixed models using Stan for full Bayesian inference.
LazyData: true
Expand Down
8 changes: 4 additions & 4 deletions R/s3.methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ plot.brmsfit <- function(x, parameters = NA, combine = FALSE, N = 5, ask = TRUE,
rel.att <- c("class", "nChains", "nIterations", "nBurnin", "nThin", "description")
pfit <- pfit[which(pfit$Parameter %in% pars),]

default.ask <- devAskNewPage()
devAskNewPage(ask = FALSE)
default.ask <- grDevices::devAskNewPage()
grDevices::devAskNewPage(ask = FALSE)
for (i in 1:ceiling(length(pars)/N)) {
pfit.sub1 <- pfit[which(pfit$Parameter %in% pars[((i-1)*N+1):min(i*N,length(pars))]),]
for (j in 1:length(rel.att))
Expand All @@ -427,7 +427,7 @@ plot.brmsfit <- function(x, parameters = NA, combine = FALSE, N = 5, ask = TRUE,
gridExtra::grid.arrange(ggmcmc::ggs_traceplot(pfit.sub1) +
ggplot2::theme(legend.position = "none"),
ggmcmc::ggs_density(pfit.sub2), ncol = 2, nrow = 1)
if (i == 1) devAskNewPage(ask = ask)
if (i == 1) grDevices::devAskNewPage(ask = ask)
}
devAskNewPage(default.ask)
grDevices::devAskNewPage(default.ask)
}
3 changes: 3 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Resubsmission
* The NAMESPACE issue concerning function 'devAskNewPage' should now be solved.

## Test environments
* local Windows 8.1 install, R 3.2.0, R 3.3.0
* win-builder (devel and release)
Expand Down

0 comments on commit a1b83cb

Please sign in to comment.