Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jun 10, 2024
1 parent 9a944e0 commit e7339a4
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 19 deletions.
1 change: 1 addition & 0 deletions R/format.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ format.parameters_brms_meta <- format.parameters_model
# Compare parameters ----------------------


#' @rdname print.compare_parameters
#' @inheritParams print.parameters_model
#' @export
format.compare_parameters <- function(x,

Check warning on line 246 in R/format.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/format.R,line=246,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 40.
Expand Down
25 changes: 25 additions & 0 deletions R/print.compare_parameters.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
#' @title Print comparisons of model parameters
#' @name print.compare_parameters
#'
#' @description A `print()`-method for objects from [`compare_parameters()`].
#'
#' @param x,object An object returned by [`compare_parameters()`].
#' @inheritParams print.parameters_model
#' @inheritSection print.parameters_model Global Options to Customize Messages and Tables when Printing
#'
#' @return Invisibly returns the original input object.
#'
#' @examples
#' \donttest{
#' data(iris)
#' lm1 <- lm(Sepal.Length ~ Species, data = iris)
#' lm2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris)
#'
#' # custom style
#' result <- compare_parameters(lm1, lm2, select = "{estimate}{stars} ({se})")
#' print(result)
#'
#' # custom style, in HTML
#' result <- compare_parameters(lm1, lm2, select = "{estimate}<br>({se})|{p}")
#' print_html(result)
#' }
#' @export
print.compare_parameters <- function(x,
split_components = TRUE,
Expand Down
1 change: 1 addition & 0 deletions R/print_html.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ print_html.parameters_simulate <- print_html.parameters_model
#' @export
print_html.parameters_sem <- print_html.parameters_model

#' @rdname print.compare_parameters
#' @export
print_html.compare_parameters <- function(x,
caption = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/print_md.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ print_md.parameters_simulate <- print_md.parameters_model
# compare parameters -------------------------


#' @rdname display.parameters_model
#' @rdname print.compare_parameters
#' @export
print_md.compare_parameters <- function(x,
digits = 2,
Expand Down
18 changes: 0 additions & 18 deletions man/display.parameters_model.Rd

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

234 changes: 234 additions & 0 deletions man/print.compare_parameters.Rd

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

0 comments on commit e7339a4

Please sign in to comment.