diff --git a/NAMESPACE b/NAMESPACE index 39d449fdb..c4027f24d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -196,4 +196,3 @@ export(theme_modern) export(theme_radar) export(theme_radar_dark) import(ggplot2) -importFrom(ggplot2,.data) diff --git a/R/geom_violindot.R b/R/geom_violindot.R index 169b833b8..eb9666dab 100644 --- a/R/geom_violindot.R +++ b/R/geom_violindot.R @@ -17,7 +17,7 @@ #' ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) + #' geom_violindot() + #' theme_modern() -#' @import ggplot2 +#' #' @export geom_violindot <- function(mapping = NULL, data = NULL, diff --git a/R/geom_violinhalf.R b/R/geom_violinhalf.R index c950a96f4..8957a9bba 100644 --- a/R/geom_violinhalf.R +++ b/R/geom_violinhalf.R @@ -31,7 +31,7 @@ #' geom_violinhalf(flip = c(1, 3)) + #' theme_modern() + #' scale_fill_material_d() -#' @import ggplot2 +#' #' @export geom_violinhalf <- function(mapping = NULL, data = NULL, @@ -68,7 +68,7 @@ geom_violinhalf <- function(mapping = NULL, #' @rdname ggplot2-ggproto #' @format NULL #' @usage NULL -#' @import ggplot2 +#' #' @keywords internal GeomViolinHalf <- ggproto("GeomViolinHalf", Geom, extra_params = c("na.rm", "flip"), diff --git a/R/plot.bayesfactor_parameters.R b/R/plot.bayesfactor_parameters.R index bd470fa5f..7809c9b43 100644 --- a/R/plot.bayesfactor_parameters.R +++ b/R/plot.bayesfactor_parameters.R @@ -15,7 +15,7 @@ #' #' @return A ggplot2-object. #' -#' @importFrom ggplot2 .data +#' #' @export plot.see_bayesfactor_parameters <- function(x, size_point = 2, diff --git a/R/plot.binned_residuals.R b/R/plot.binned_residuals.R index 6ec460caa..a6fbb5243 100644 --- a/R/plot.binned_residuals.R +++ b/R/plot.binned_residuals.R @@ -1,4 +1,4 @@ -#' @importFrom ggplot2 .data +#' #' @export plot.see_binned_residuals <- function(x, size_line = 0.7, diff --git a/R/plot.check_collinearity.R b/R/plot.check_collinearity.R index 3033ad74b..594c556ec 100644 --- a/R/plot.check_collinearity.R +++ b/R/plot.check_collinearity.R @@ -13,7 +13,7 @@ #' result <- check_collinearity(m) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_check_collinearity <- function(x, data = NULL, diff --git a/R/plot.check_homogeneity.R b/R/plot.check_homogeneity.R index 428aa3db1..590be6900 100644 --- a/R/plot.check_homogeneity.R +++ b/R/plot.check_homogeneity.R @@ -12,7 +12,7 @@ #' result <- check_homogeneity(model) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_check_homogeneity <- function(x, data = NULL, ...) { if (is.null(data)) { diff --git a/R/plot.check_model.R b/R/plot.check_model.R index e65b31959..29c13ff02 100644 --- a/R/plot.check_model.R +++ b/R/plot.check_model.R @@ -14,7 +14,7 @@ #' @examplesIf require("performance") && require("patchwork") #' model <- lm(qsec ~ drat + wt, data = mtcars) #' plot(check_model(model)) -#' @importFrom ggplot2 .data +#' #' @export plot.see_check_model <- function(x, style = theme_lucid, diff --git a/R/plot.compare_performance.R b/R/plot.compare_performance.R index 85848f011..3db5c7871 100644 --- a/R/plot.compare_performance.R +++ b/R/plot.compare_performance.R @@ -72,7 +72,7 @@ data_plot.compare_performance <- function(x, data = NULL, ...) { #' result <- compare_performance(lm1, lm2, lm3) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_compare_performance <- function(x, size_line = 1, ...) { # We may think of plotting the "performance scores" as bar plots, diff --git a/R/plot.estimate_contrasts.R b/R/plot.estimate_contrasts.R index 948c1123c..d2f329b89 100644 --- a/R/plot.estimate_contrasts.R +++ b/R/plot.estimate_contrasts.R @@ -76,7 +76,7 @@ data_plot.estimate_contrasts <- function(x, data = NULL, ...) { #' means <- estimate_means(model) #' plot(contrasts, means) #' } -#' @importFrom ggplot2 .data +#' #' @export plot.see_estimate_contrasts <- function(x, data = NULL, ...) { if (!inherits(x, "data_plot")) { diff --git a/R/plot.estimate_density.R b/R/plot.estimate_density.R index bfb7fdb4f..f472bcad7 100644 --- a/R/plot.estimate_density.R +++ b/R/plot.estimate_density.R @@ -96,7 +96,7 @@ data_plot.estimate_density <- function(x, #' m <<- suppressWarnings(stan_glm(Sepal.Length ~ Petal.Width * Species, data = iris, refresh = 0)) #' result <- estimate_density(m) #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_estimate_density <- function(x, stack = TRUE, @@ -244,7 +244,7 @@ plot.see_estimate_density <- function(x, data_plot.estimate_density_df <- data_plot.estimate_density -#' @importFrom ggplot2 .data +#' #' @export plot.see_estimate_density_df <- function(x, stack = TRUE, diff --git a/R/plot.hdi.R b/R/plot.hdi.R index 490289b24..bab66afe9 100644 --- a/R/plot.hdi.R +++ b/R/plot.hdi.R @@ -202,7 +202,7 @@ data_plot.bayestestR_eti <- data_plot.hdi #' result <- hdi(m) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_hdi <- function(x, data = NULL, diff --git a/R/plot.n_factors.R b/R/plot.n_factors.R index b332488b5..71a967037 100644 --- a/R/plot.n_factors.R +++ b/R/plot.n_factors.R @@ -84,7 +84,7 @@ data_plot.n_clusters <- data_plot.n_factors #' result <- n_factors(mtcars, type = "PCA") #' result #' plot(result, type = "line") -#' @importFrom ggplot2 .data +#' #' @export plot.see_n_factors <- function(x, data = NULL, diff --git a/R/plot.p_direction.R b/R/plot.p_direction.R index 3e268e4f4..e9827f948 100644 --- a/R/plot.p_direction.R +++ b/R/plot.p_direction.R @@ -157,7 +157,7 @@ data_plot.p_direction <- function(x, data = NULL, show_intercept = FALSE, ...) { #' m <<- suppressWarnings(stan_glm(Sepal.Length ~ Petal.Width * Species, data = iris, refresh = 0)) #' result <- p_direction(m) #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_p_direction <- function(x, data = NULL, diff --git a/R/plot.p_significance.R b/R/plot.p_significance.R index cf22c580a..9e45c4f80 100644 --- a/R/plot.p_significance.R +++ b/R/plot.p_significance.R @@ -169,7 +169,7 @@ data_plot.p_significance <- function(x, #' m <<- suppressWarnings(stan_glm(Sepal.Length ~ Petal.Width * Species, data = iris, refresh = 0)) #' result <- p_significance(m) #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_p_significance <- function(x, data = NULL, diff --git a/R/plot.parameters_pca.R b/R/plot.parameters_pca.R index a0ca2c8d0..0b10ae0fe 100644 --- a/R/plot.parameters_pca.R +++ b/R/plot.parameters_pca.R @@ -73,7 +73,7 @@ data_plot.parameters_efa <- data_plot.parameters_pca #' result <- principal_components(mtcars[, 1:7], n = "all", threshold = 0.2) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_parameters_pca <- function(x, type = c("bar", "line"), diff --git a/R/plot.parameters_sem.R b/R/plot.parameters_sem.R index 0442cbffa..c4b5da884 100644 --- a/R/plot.parameters_sem.R +++ b/R/plot.parameters_sem.R @@ -86,7 +86,7 @@ data_plot.parameters_sem <- function(x, #' @param threshold_coefficient Numeric, threshold at which value coefficients will be displayed. #' @param threshold_p Numeric, threshold at which value p-values will be displayed. #' @param ci Logical, whether confidence intervals should be added to the plot. -#' @importFrom ggplot2 .data +#' #' @rdname plot.see_parameters_model #' @export plot.see_parameters_sem <- function(x, diff --git a/R/plot.point_estimates.R b/R/plot.point_estimates.R index 72aefdb62..1ebdfdb75 100644 --- a/R/plot.point_estimates.R +++ b/R/plot.point_estimates.R @@ -98,7 +98,7 @@ data_plot.map_estimate <- data_plot.point_estimate #' result <- point_estimate(m, centrality = "median") #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_point_estimate <- function(x, data = NULL, diff --git a/R/plot.rope.R b/R/plot.rope.R index 5199a3d8e..c7b79e3ae 100644 --- a/R/plot.rope.R +++ b/R/plot.rope.R @@ -83,7 +83,7 @@ data_plot.rope <- function(x, data = NULL, show_intercept = FALSE, ...) { #' result <- rope(m) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_rope <- function(x, data = NULL, diff --git a/R/plot.si.R b/R/plot.si.R index 85fee8a56..479d7b023 100644 --- a/R/plot.si.R +++ b/R/plot.si.R @@ -20,7 +20,7 @@ #' result <- si(m) #' result #' plot(result) -#' @importFrom ggplot2 .data +#' #' @export plot.see_si <- function(x, si_color = "#0171D3", diff --git a/R/see-package.R b/R/see-package.R index 303ccae89..e02cb6f66 100644 --- a/R/see-package.R +++ b/R/see-package.R @@ -17,6 +17,13 @@ #' @keywords internal "_PACKAGE" +## see namespace: start +## +#' @import ggplot2 +#' +## see namespace: end +NULL + # Suppress R CMD check note # Namespace in Imports field not imported from: PKG # All declared Imports should be used. diff --git a/man/geom_violindot.Rd b/man/geom_violindot.Rd index 246141414..b02b4b4cf 100644 --- a/man/geom_violindot.Rd +++ b/man/geom_violindot.Rd @@ -90,4 +90,5 @@ library(see) ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) + geom_violindot() + theme_modern() + } diff --git a/man/geom_violinhalf.Rd b/man/geom_violinhalf.Rd index 3316ba066..82b68ae8e 100644 --- a/man/geom_violinhalf.Rd +++ b/man/geom_violinhalf.Rd @@ -101,4 +101,5 @@ ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) + geom_violinhalf(flip = c(1, 3)) + theme_modern() + scale_fill_material_d() + } diff --git a/man/plot.see_check_collinearity.Rd b/man/plot.see_check_collinearity.Rd index 999608443..865efbd18 100644 --- a/man/plot.see_check_collinearity.Rd +++ b/man/plot.see_check_collinearity.Rd @@ -40,4 +40,5 @@ m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) result <- check_collinearity(m) result plot(result) + } diff --git a/man/plot.see_compare_performance.Rd b/man/plot.see_compare_performance.Rd index a0e2a218b..351e46ebf 100644 --- a/man/plot.see_compare_performance.Rd +++ b/man/plot.see_compare_performance.Rd @@ -28,4 +28,5 @@ lm3 <- lm(Sepal.Length ~ Species * Petal.Length, data = iris) result <- compare_performance(lm1, lm2, lm3) result plot(result) + } diff --git a/man/plot.see_parameters_pca.Rd b/man/plot.see_parameters_pca.Rd index 15fe47d2c..c0756c23f 100644 --- a/man/plot.see_parameters_pca.Rd +++ b/man/plot.see_parameters_pca.Rd @@ -45,4 +45,5 @@ data(mtcars) result <- principal_components(mtcars[, 1:7], n = "all", threshold = 0.2) result plot(result) + }