Skip to content

Commit

Permalink
fix error, for slim and drop args
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorDonegan committed Jun 3, 2023
1 parent 874df77 commit d612e20
Show file tree
Hide file tree
Showing 25 changed files with 111 additions and 89 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ man/*.Rd
cran-comments.md
/doc/
/Meta/
CRAN-RELEASE
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: geostan
Title: Bayesian Spatial Analysis
Version: 0.5.0
Version: 0.5.1
Date: 2023-05-29
URL: https://connordonegan.github.io/geostan/
BugReports: https://github.com/ConnorDonegan/geostan/issues
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

# geostan 0.5.1

### Minor fixes

This release fixes some issues that were introduced with the `slim` and `drop` arguments (in v0.5.0).

# geostan 0.5.0

## New additions
Expand Down
4 changes: 2 additions & 2 deletions R/internal-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ clean_results <- function(samples, pars, is_student, has_re, Wx, x, x_me_idx) {
b_names = dimnames(x)[[2]]
samples <- par_alias(samples, "^beta\\[", b_names)
}
if (sum(x_me_idx)) {
if ('x_true' %in% pars) {
x_names <- dimnames(x)[[2]]
for (i in seq_along(x_me_idx)) {
x.id <- paste0("x_", rep(x_names[x_me_idx[i]], times = n), paste0("[", 1:n, "]"))
Expand Down Expand Up @@ -392,7 +392,7 @@ empty_sar_data <- function(n) {
#' @noRd
drop_params <- function(pars, drop_list) {
if (!is.null(drop_list)) {
drop <- paste0(drop_list, collapse = "|")
drop <- paste0("^", drop_list, "$", collapse = "|")
keep_idx <- !grepl(drop, pars)
pars <- pars[keep_idx]
}
Expand Down
2 changes: 0 additions & 2 deletions R/stan_icar.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@
#'
#' @examples
#' \donttest{
#' # for parallel processing of models:
#' #options(mc.cores = parallel::detectCores())
#' data(sentencing)
#' C <- shape2mat(sentencing, "B")
#' log_e <- log(sentencing$expected_sents)
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

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

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

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

2 changes: 1 addition & 1 deletion docs/LICENSE.html

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

2 changes: 1 addition & 1 deletion docs/articles/index.html

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

52 changes: 26 additions & 26 deletions docs/articles/raster-regression.html

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d612e20

Please sign in to comment.