Skip to content

Commit

Permalink
Collect roxygen import tags in a single location (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Sep 17, 2023
1 parent eccd98c commit 7f4b83b
Show file tree
Hide file tree
Showing 26 changed files with 33 additions and 22 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,3 @@ export(theme_modern)
export(theme_radar)
export(theme_radar_dark)
import(ggplot2)
importFrom(ggplot2,.data)
2 changes: 1 addition & 1 deletion R/geom_violindot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions R/geom_violinhalf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion R/plot.bayesfactor_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#'
#' @return A ggplot2-object.
#'
#' @importFrom ggplot2 .data
#'
#' @export
plot.see_bayesfactor_parameters <- function(x,
size_point = 2,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.binned_residuals.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @importFrom ggplot2 .data
#'
#' @export
plot.see_binned_residuals <- function(x,
size_line = 0.7,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.check_collinearity.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' result <- check_collinearity(m)
#' result
#' plot(result)
#' @importFrom ggplot2 .data
#'
#' @export
plot.see_check_collinearity <- function(x,
data = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.check_homogeneity.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion R/plot.check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,

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

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=19,col=1,[cyclocomp_linter] Functions should have cyclomatic complexity of less than 40, this has 78.
style = theme_lucid,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.compare_performance.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.estimate_contrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
4 changes: 2 additions & 2 deletions R/plot.estimate_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.hdi.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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 @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.p_direction.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.p_significance.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.parameters_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion R/plot.parameters_sem.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.point_estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.rope.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.si.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' result <- si(m)
#' result
#' plot(result)
#' @importFrom ggplot2 .data
#'
#' @export
plot.see_si <- function(x,
si_color = "#0171D3",
Expand Down
7 changes: 7 additions & 0 deletions R/see-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions man/geom_violindot.Rd

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

1 change: 1 addition & 0 deletions man/geom_violinhalf.Rd

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

1 change: 1 addition & 0 deletions man/plot.see_check_collinearity.Rd

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

1 change: 1 addition & 0 deletions man/plot.see_compare_performance.Rd

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

1 change: 1 addition & 0 deletions man/plot.see_parameters_pca.Rd

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

0 comments on commit 7f4b83b

Please sign in to comment.