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 CRAN note #659

Merged
merged 2 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: bayestestR
Title: Understand and Describe Bayesian Models and Posterior Distributions
Version: 0.14.0.1
Version: 0.14.0.2
Authors@R:
c(person(given = "Dominique",
family = "Makowski",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# bayestestR (development version)

## Bug fixes

* Fixed warning in CRAN check results.

# bayestestR 0.14.0

## Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion R/estimate_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
#' means that the x axis will be extended by `1/10` of the range of the data.
#' @param select Character vector of column names. If `NULL` (the default), all
#' numeric variables will be selected. Other arguments from
#' [`datawizard::extract_column_names()`] (such as `exclude`) can also be used.
#' `datawizard::extract_column_names()` (such as `exclude`) can also be used.
#' @param by Optional character vector. If not `NULL` and input is a data frame,
#' density estimation is performed for each group (subsets) indicated by `by`.
#' See examples.
#' @param at Deprecated in favour of `by`.
#'
#' @note There is also a [`plot()`-method](https://easystats.github.io/see/articles/bayestestR.html) implemented in the \href{https://easystats.github.io/see/}{\pkg{see}-package}.

Check warning on line 29 in R/estimate_density.R

View workflow job for this annotation

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

file=R/estimate_density.R,line=29,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 179 characters.
#'
#' @examplesIf require("logspline") && require("KernSmooth") && require("mclust") && require("emmeans") && require("rstanarm") && require("brms")

Check warning on line 31 in R/estimate_density.R

View workflow job for this annotation

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

file=R/estimate_density.R,line=31,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 145 characters.
#' library(bayestestR)
#'
#' set.seed(1)
Expand Down Expand Up @@ -390,7 +390,7 @@
extend_scale = 0.1,
bw = "SJ",
effects = c("fixed", "random", "all"),
component = c("location", "all", "conditional", "smooth_terms", "sigma", "distributional", "auxiliary"),

Check warning on line 393 in R/estimate_density.R

View workflow job for this annotation

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

file=R/estimate_density.R,line=393,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 141 characters.
parameters = NULL,
...) {
effects <- match.arg(effects)
Expand Down Expand Up @@ -584,7 +584,7 @@

for (i in names(out)) {
if (nrow(out[[i]]) == 0) {
insight::format_warning(paste0("`", i, "`, or one of its groups specified in `by`, is empty and has no density information."))

Check warning on line 587 in R/estimate_density.R

View workflow job for this annotation

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

file=R/estimate_density.R,line=587,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 132 characters.
} else {
out[[i]]$Parameter <- i
}
Expand Down
2 changes: 1 addition & 1 deletion man/estimate_density.Rd

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

12 changes: 6 additions & 6 deletions vignettes/probability_of_direction.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Probability of Direction (pd)"
output:
output:
rmarkdown::html_vignette:
toc: true
fig_width: 10.08
Expand All @@ -10,7 +10,7 @@ vignette: >
\usepackage[utf8]{inputenc}
%\VignetteIndexEntry{Probability of Direction (pd)}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
editor_options:
chunk_output_type: console
bibliography: bibliography.bib
csl: apa.csl
Expand Down Expand Up @@ -98,10 +98,10 @@ dat <- transform(
)
ggplot(dat, aes(x = p_direction, y = p_value, color = effect_existence)) +
geom_point2(alpha = 0.1) +
geom_segment(aes(x = 95, y = Inf, xend = 95, yend = 0.1), color = "black", linetype = "longdash") +
geom_segment(aes(x = -Inf, y = 0.1, xend = 95, yend = 0.1), color = "black", linetype = "longdash") +
geom_segment(aes(x = 97.5, y = Inf, xend = 97.5, yend = 0.05), color = "black", linetype = "dashed") +
geom_segment(aes(x = -Inf, y = 0.05, xend = 97.5, yend = 0.05), color = "black", linetype = "dashed") +
annotate("segment", x = 95, y = Inf, xend = 95, yend = 0.1, color = "black", linetype = "longdash") +
annotate("segment", x = -Inf, y = 0.1, xend = 95, yend = 0.1, color = "black", linetype = "longdash") +
annotate("segment", x = 97.5, y = Inf, xend = 97.5, yend = 0.05, color = "black", linetype = "dashed") +
annotate("segment", x = -Inf, y = 0.05, xend = 97.5, yend = 0.05, color = "black", linetype = "dashed") +
theme_modern() +
scale_y_reverse(breaks = c(0.05, round(seq(0, 1, length.out = 11), digits = 2))) +
scale_x_continuous(breaks = c(95, 97.5, round(seq(50, 100, length.out = 6)))) +
Expand Down
Loading