Skip to content

Commit

Permalink
minor update with new syntax for default values from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
venpopov committed Feb 28, 2024
1 parent f485e2a commit 1b9cfeb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions R/bmm_model_SDT.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#############################################################################!
# see file 'R/bmm_model_mixture3p.R' for an example

.model_SDT <- function(response, stimulus, nTrials = NULL, dist_noise = "gumbel", ...) {
.model_SDT <- function(response = NULL, stimulus = NULL, nTrials = NULL, dist_noise = "gumbel", ...) {
out <- list(
resp_vars = nlist(response, stimulus, nTrials),
other_vars = nlist(dist_noise, ...),
Expand All @@ -29,9 +29,9 @@
# user facing alias
# information in the title and details sections will be filled in
# automatically based on the information in the .model_SDT()$info
#' @title `r .model_SDT(NA,NA)$info$name`
#' @title `r .model_SDT()$info$name`
#' @name SDT
#' @details `r model_info(SDT(NA,NA))`
#' @details `r model_info(.model_SDT())`
#' @param response The variable name of the response variable in the data set.
#' The response given when a stimulus appears. Either these can be integers
#' indicating that noise/new information was detected `0` or a signal/old information was
Expand All @@ -55,7 +55,12 @@
#' \dontrun{
#' # put a full example here (see 'R/bmm_model_mixture3p.R' for an example)
#' }
SDT <- .model_SDT
SDT <- function(response, stimulus, nTrials = NULL, dist_noise = "gumbel", ...) {
stop_missing_args()
.model_SDT(response = response, stimulus = stimulus, nTrials = nTrials,
dist_noise = dist_noise, ...)
}



#############################################################################!
Expand Down Expand Up @@ -172,7 +177,7 @@ configure_model.SDT <- function(model, data, formula) {
# ?postprocess_brm for details

#' @export
postprocess_brm.SDT <- function(model, fit) {
postprocess_brm.SDT <- function(model, fit, ...) {
# any required postprocessing (if none, delete this section)

return(fit)
Expand Down

0 comments on commit 1b9cfeb

Please sign in to comment.