Skip to content

Commit

Permalink
fix remaining examples
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Mar 23, 2024
1 parent a1ac379 commit 23608e6
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion R/data_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ data_plot <- function(x, ...) {
#' chains = 2, iter = 200, refresh = 0
#' ))
#'
#' result <- hdi(model, ci = c(0.5, 0.75, 0.9, 0.95))
#' result <- bayestestR::hdi(model, ci = c(0.5, 0.75, 0.9, 0.95))
#' data <- data_plot(result, data = model)
#'
#' p <- ggplot(
Expand Down
2 changes: 1 addition & 1 deletion R/plot.check_heteroscedasticity.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#'
#' @examples
#' m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
#' result <- check_heteroscedasticity(m)
#' result <- performance::check_heteroscedasticity(m)
#' result
#' plot(result, data = m) # data required for pkgdown
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/plot.compare_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' lm1 <- lm(Sepal.Length ~ Species, data = iris)
#' lm2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris)
#' lm3 <- lm(Sepal.Length ~ Species * Petal.Length, data = iris)
#' result <- compare_parameters(lm1, lm2, lm3)
#' result <- parameters::compare_parameters(lm1, lm2, lm3)
#' plot(result)
#' @export
plot.see_compare_parameters <- function(x,

Check warning on line 25 in R/plot.compare_parameters.R

View workflow job for this annotation

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

file=R/plot.compare_parameters.R,line=25,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 40.

Check warning on line 25 in R/plot.compare_parameters.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.compare_parameters.R,line=25,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 40.
Expand Down
2 changes: 2 additions & 0 deletions R/plot.estimate_contrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ data_plot.estimate_contrasts <- function(x, data = NULL, ...) {
#'
#' @examplesIf require("emmeans")
#' \donttest{
#' library(modelbased)
#'
#' model <- lm(Sepal.Width ~ Species, data = iris)
#' contrasts <- estimate_contrasts(model)
#' means <- estimate_means(model)
Expand Down
2 changes: 1 addition & 1 deletion R/plot.n_factors.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ data_plot.n_clusters <- data_plot.n_factors
#'
#' @examplesIf require("nFactors")
#' data(mtcars)
#' result <- n_factors(mtcars, type = "PCA")
#' result <- parameters::n_factors(mtcars, type = "PCA")
#' result
#'
#' plot(result) # type = "bar" by default
Expand Down
2 changes: 1 addition & 1 deletion R/plot.parameters_brms_meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ data_plot.parameters_brms_meta <- function(x, data = NULL, normalize_height = TR
#' prior(cauchy(0, 0.5), class = sd)
#' )
#' model <- suppressWarnings(
#' brm(yi | se(vi) ~ 1 + (1 | author), data = dat)
#' brm(yi | se(vi) ~ 1 + (1 | author), data = dat, refresh = 0, silent = 2)
#' )
#'
#' # result
Expand Down
2 changes: 1 addition & 1 deletion man/add_plot_attributes.Rd

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

2 changes: 1 addition & 1 deletion man/plot.see_check_heteroscedasticity.Rd

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

2 changes: 1 addition & 1 deletion man/plot.see_compare_parameters.Rd

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

2 changes: 2 additions & 0 deletions man/plot.see_estimate_contrasts.Rd

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

2 changes: 1 addition & 1 deletion man/plot.see_n_factors.Rd

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

2 changes: 1 addition & 1 deletion man/plot.see_parameters_brms_meta.Rd

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

0 comments on commit 23608e6

Please sign in to comment.