Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in vignette #319

Merged
merged 9 commits into from
Feb 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
strengejacke committed Feb 2, 2024
commit 54d41afd71a9a4d216d0a8bb5ab48a1bd020fba6
2 changes: 1 addition & 1 deletion vignettes/performance.Rmd
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@ _([related function documentation](https://easystats.github.io/performance/refer

```{r}
model <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
result <- check_normality(model)
result <<- check_normality(model)
```

### Density Plot

Unchanged files with check annotations Beta

data("qol_cancer")
set.seed(12345)
sleepstudy$grp <- sample(1:5, size = 180, replace = TRUE)

Check warning on line 77 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=77,col=19,[sample_int_linter] sample.int(n, m, ...) is preferable to sample(1:n, m, ...).
theme_set(theme_modern())
```
# We download the model to save computation time. Here is the code
# to refit the exact model used below...
# zinb <- read.csv("http://stats.idre.ucla.edu/stat/data/fish.csv")

Check warning on line 237 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=237,col=3,[commented_code_linter] Remove commented code.
# set.seed(123)

Check warning on line 238 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=238,col=3,[commented_code_linter] Remove commented code.
# model <- brm(bf(
# count ~ persons + child + camper + (1 | persons),

Check warning on line 240 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=240,col=7,[commented_code_linter] Remove commented code.
# zi ~ child + camper + (1 | persons)

Check warning on line 241 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=241,col=7,[commented_code_linter] Remove commented code.
# ),
# data = zinb,

Check warning on line 243 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=243,col=5,[commented_code_linter] Remove commented code.
# family = zero_inflated_poisson()

Check warning on line 244 in vignettes/parameters.Rmd

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

file=vignettes/parameters.Rmd,line=244,col=5,[commented_code_linter] Remove commented code.
# )
brms_model <- insight::download_model("brms_zi_2")
result <- model_parameters(
#' geom_from_list(list(geom = "ggside::scale_xsidey_continuous", breaks = NULL))
#'
#' @export
geom_from_list <- function(x, ...) {

Check warning on line 115 in R/geom_from_list.R

GitHub Actions / lint / lint

file=R/geom_from_list.R,line=115,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 54 to at most 40.
# Additional parameters ------------------------------------------------------
arguments <- x[!names(x) %in% c("geom", "aes", "data", "width", "height", "position", "show.legend")]
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 10 in R/plot.check_heteroscedasticity.R

GitHub Actions / lint / lint

file=R/plot.check_heteroscedasticity.R,line=10,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance")
#' m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 12 in R/plot.check_model.R

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=12,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance") && require("patchwork")
#' model <- lm(qsec ~ drat + wt, data = mtcars)
#' plot(check_model(model))
#'
#' @export
plot.see_check_model <- function(x,

Check warning on line 19 in R/plot.check_model.R

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=19,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 78 to at most 40.
style = theme_lucid,
colors = NULL,
type = c("density", "discrete_dots", "discrete_interval", "discrete_both"),
overdisp_type <- attr(x, "overdisp_type")
plot_type <- attr(x, "type")
if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) {

Check warning on line 43 in R/plot.check_model.R

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=43,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
type <- plot_type
} else {
type <- match.arg(type)
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 27 in R/plot.check_normality.R

GitHub Actions / lint / lint

file=R/plot.check_normality.R,line=27,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance")
#' m <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
)
},
ggplot2::geom_qq(
mapping = if (detrend) ggplot2::aes(y = ggplot2::after_stat(.data$sample) - ggplot2::after_stat(.data$theoretical)),

Check warning on line 238 in R/plot.check_normality.R

GitHub Actions / lint / lint

file=R/plot.check_normality.R,line=238,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 124 characters.
shape = 16,
na.rm = TRUE,
stroke = 0,
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 56 in R/plot.check_predictions.R

GitHub Actions / lint / lint

file=R/plot.check_predictions.R,line=56,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance")
#' model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length, data = iris)
check_range <- isTRUE(attributes(x)$check_range)
plot_type <- attributes(x)$type
if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) {

Check warning on line 86 in R/plot.check_predictions.R

GitHub Actions / lint / lint

file=R/plot.check_predictions.R,line=86,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
type <- plot_type
} else {
type <- match.arg(type)
check_range <- isTRUE(attributes(x)$check_range)
plot_type <- attributes(x)$type
if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) {

Check warning on line 133 in R/plot.check_predictions.R

GitHub Actions / lint / lint

file=R/plot.check_predictions.R,line=133,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
type <- plot_type
} else {
type <- match.arg(type)