Skip to content

Commit

Permalink
document issue #1387
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Aug 12, 2022
1 parent 737121d commit 9a78c87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 12 additions & 2 deletions R/formula-ad.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#' Provide additional information on the response variable
#' in \pkg{brms} models, such as censoring, truncation, or
#' known measurement error. Detailed documentation on the use
#' of each of these functions can be found in the Details section
#' of each of these functions can be found in the Details section
#' of \code{\link{brmsformula}} (under "Additional response information").
#'
#' @name addition-terms
#' @aliases se weights trials thres cat dec cens trunc
#' @aliases se weights trials thres cat dec cens trunc
#' @aliases index rate subset vreal vint
#'
#' @param x A vector; usually a variable defined in the data. Allowed values
Expand Down Expand Up @@ -57,6 +57,10 @@
#' More information is given in the 'Details' section
#' of \code{\link{brmsformula}} (under "Additional response information").
#'
#' It is highly recommended to use a single data variable as input
#' for `x` (instead of a more complicated expression) to make sure all
#' post-processing functions work as expected.
#'
#' @seealso
#' \code{\link{brm}},
#' \code{\link{brmsformula}}
Expand Down Expand Up @@ -428,3 +432,9 @@ check_cross_formula_indexing <- function(bterms) {
}
invisible(TRUE)
}

# does an expression consist of a single variable?
is_single_variable <- function(x) {
x <- as_one_character(x)
is_equal(x, all_vars(x))
}
6 changes: 5 additions & 1 deletion man/addition-terms.Rd

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

0 comments on commit 9a78c87

Please sign in to comment.