Skip to content

Commit

Permalink
Merge branch 'hotfix/remove-warnings'
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeyeongYang committed Jan 21, 2019
2 parents fd2a2c6 + a7ce9b8 commit b1128e7
Show file tree
Hide file tree
Showing 67 changed files with 793 additions and 715 deletions.
11 changes: 6 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: hBayesDM
Title: Hierarchical Bayesian Modeling of Decision-Making Tasks
Version: 0.7.0
Date: 2018-12-14
Version: 0.7.1
Date: 2019-01-21
Author:
Woo-Young Ahn [aut, cre],
Nate Haines [aut],
Expand All @@ -21,11 +21,12 @@ Description:
Fit an array of decision-making tasks with computational models in
a hierarchical Bayesian framework. Can perform hierarchical Bayesian analysis of
various computational models with a single line of coding.
Ahn et al. (2018) <doi:10.1162/CPSY_a_00002>
Depends:
R (>= 3.4.0)
Imports:
methods,
R (>= 3.4.0),
Rcpp (>= 0.12.0),
methods
Imports:
rstan (>= 2.18.1),
loo (>= 2.0),
grid,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# hBayesDM 0.7.1

* Make it usable without manually loading `rstan`.
* Remove an annoying warning about using `..insensitive_data_columns`.

# hBayesDM 0.7.0

* Now, in default, you should build a Stan file into a binary for the first time to use it. To build all the models on installation, you should set an environmental variable `BUILD_ALL` to `true` before installation.
Expand Down
3 changes: 1 addition & 2 deletions R/hBayesDM_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ hBayesDM_model <- function(task_name,
colnames_raw_data <- colnames(raw_data)

# Check if necessary data columns all exist (while ignoring case and underscores)
..insensitive_data_columns <- NULL # To avoid NOTEs by R CMD check
insensitive_data_columns <- tolower(gsub("_", "", data_columns, fixed = TRUE))
colnames(raw_data) <- tolower(gsub("_", "", colnames(raw_data), fixed = TRUE))
if (!all(insensitive_data_columns %in% colnames(raw_data))) {
Expand All @@ -179,7 +178,7 @@ hBayesDM_model <- function(task_name,
}

# Remove only the rows containing NAs in necessary columns
complete_rows <- complete.cases(raw_data[, ..insensitive_data_columns])
complete_rows <- complete.cases(raw_data[, insensitive_data_columns, with = FALSE])
sum_incomplete_rows <- sum(!complete_rows)
if (sum_incomplete_rows > 0) {
raw_data <- raw_data[complete_rows, ]
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ install.packages("hBayesDM") # Install from CRAN
devtools::install_github("CCS-Lab/hBayesDM") # Install from GitHub
```

### Caveats

Before you load `hBayesDM`, you should load `rstan` to make sampling properly work.

```r
library(rstan)
library(hBayesDM)
```

### Quick Links

- **Tutorial**: http://rpubs.com/CCSL/hBayesDM
Expand Down
1,197 changes: 638 additions & 559 deletions docs/LICENSE-text.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/authors.html

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

51 changes: 22 additions & 29 deletions docs/index.html

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

Loading

0 comments on commit b1128e7

Please sign in to comment.