forked from venpopov/bmm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from venpopov/develop
Merge new `bmm` version
- Loading branch information
Showing
18 changed files
with
675 additions
and
655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
Package: bmm | ||
Title: Easy and Accesible Bayesian Measurement Models using 'brms' | ||
Version: 0.3.9.9000 | ||
Version: 0.4.0.9000 | ||
Authors@R: c( | ||
person("Vencislav", "Popov", , "[email protected]", role = c("aut", "cre", "cph")), | ||
person("Gidon", "Frischkorn", , "[email protected]", role = c("aut", "cph"))) | ||
Description: Wrapper functions and custom distributions that make it easier to estimate common | ||
measurement models for using the 'brms' package. Currently implemented | ||
are the two-parameter mixture model by Zhang and Luck (2008),the three- | ||
parameter mixture model by Bays et al (2009), and the Interference Measurement Model | ||
(Oberauer et al., 2017). | ||
License: GPL (>= 3) | ||
person("Gidon", "Frischkorn", , "[email protected]", role = c("aut", "cph")), | ||
person("Paul", "Bürkner", , "[email protected]", role = c("cph"), | ||
comment = "Creator of brms, a package for Bayesian regression model that this package builds upon.")) | ||
Description: Implementations of computational measurement models using the 'brms' package. | ||
Currently implemented models can be listed using supported_models(). The package also | ||
provides functions to extract model informations such as priors, or the generated | ||
STAN code. For all implemented models there are also density and random generation | ||
functions to easily explore model predictions and evaluate parameter recovery. | ||
Finally, helper functions aid in pre- and post-processing data for efficient communication | ||
of results. | ||
License: GPL-2 | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.1 | ||
|
@@ -41,6 +45,9 @@ Imports: | |
methods | ||
URL: https://github.com/venpopov/bmm, https://venpopov.github.io/bmm/ | ||
BugReports: https://github.com/venpopov/bmm/issues | ||
Additional_repositories: | ||
https://mc-stan.org/r-packages/ | ||
https://paul-buerkner.github.io/brms/ | ||
VignetteBuilder: knitr | ||
Depends: | ||
R (>= 2.10), | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.onLoad <- function(libname, pkgname) { | ||
suppressMessages(bmm_options(reset_options = TRUE)) | ||
} | ||
|
||
.onAttach <- function(libname, pkgname) { | ||
# test if local installation is behind CRAN | ||
cran_pkgs <- utils::available.packages(repos = "http://cran.us.r-project.org") | ||
cran_version <- cran_pkgs[which(cran_pkgs[,"Package"] == "bmm"),"Version"] | ||
local_version <- utils::packageVersion("bmm") | ||
behind_cran <- cran_version > local_version | ||
|
||
# add banner of package | ||
banner <- " _ | ||
| |_ _____ _____ | ||
| . | | | | ||
|___|_|_|_|_|_|_| | ||
" | ||
|
||
versionMsg <- paste0("Loading bmm (version: ",local_version,").\n") | ||
|
||
startUpMsg <- c( | ||
paste0("A short introduction to package is available by calling help(\"bmm\"). \n", | ||
"More detailed articles on how to fit different models are available via vignette(package=\"bmm\").\n", | ||
"You can view the list of currently available models by calling supported_models().\n") | ||
) | ||
|
||
optionsMsg <- tryCatch2(bmm_options())$message | ||
|
||
if (interactive()) { | ||
if (length(behind_cran) > 0 && behind_cran) { | ||
msg <- "A newer version of bmm is available on CRAN." | ||
packageStartupMessage(msg, "\nWould you like to install it?") | ||
if (utils::menu(c("Yes", "No")) == 1) { | ||
utils::update.packages("bmm") | ||
} | ||
} else { | ||
packageStartupMessage(banner, versionMsg, startUpMsg, optionsMsg) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.