-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: rossellhayes <[email protected]>
- Loading branch information
1 parent
b784777
commit 155f77d
Showing
15 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
linters: with_defaults( | ||
linters: linters_with_defaults( | ||
line_length_linter(120), | ||
T_and_F_symbol_linter, | ||
absolute_path_linter, | ||
nonportable_path_linter, | ||
semicolon_terminator_linter, | ||
semicolon_linter, | ||
undesirable_operator_linter | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: ggcheck | ||
Title: Inspect 'ggplot2' Plots for Automated Grading in Learning Exercises | ||
Version: 0.0.4 | ||
Version: 0.0.5 | ||
Authors@R: c( | ||
person("Garrick", "Aden-Buie", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0002-7111-0077")), | ||
|
@@ -23,7 +23,7 @@ URL: https://github.com/rstudio/ggcheck | |
BugReports: https://github.com/rstudio/ggcheck/issues | ||
Imports: | ||
ggplot2, | ||
gradethis (>= 0.2.4.9000), | ||
gradethis (>= 0.2.12.9004), | ||
purrr, | ||
rlang, | ||
utils | ||
|
@@ -36,4 +36,4 @@ Config/Needs/website: pkgdown, tidyverse/tidytemplate | |
Config/testthat/edition: 3 | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.2 | ||
RoxygenNote: 7.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#' List the geoms used by a plot | ||
#' | ||
#' \code{get_geoms} returns a vector of geom names, written as character | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#' Compare two `ggplot`s to check whether they are equal | ||
#' | ||
#' @param x,y Two `ggplot` objects to compare | ||
#' @param ... Unused | ||
#' | ||
#' @seealso [gradethis::gradethis_equal()] for the generic function. | ||
#' @inherit gradethis::gradethis_equal return | ||
#' @importFrom gradethis gradethis_equal | ||
#' @export | ||
#' | ||
#' @examples | ||
#' library(ggplot2) | ||
#' library(ggcheck) | ||
#' library(gradethis) | ||
#' | ||
#' cty_plot <- ggplot(mpg, aes(x = displ, y = cty)) + geom_point() | ||
#' hwy_plot <- ggplot(mpg, aes(x = displ, y = cty)) + geom_point() | ||
#' | ||
#' gradethis_equal(cty_plot, hwy_plot) | ||
#' gradethis_equal(cty_plot, cty_plot) | ||
gradethis_equal.ggplot <- function(x, y, ...) { | ||
try(ggplot2::ggplot_build(x), silent = TRUE) | ||
try(ggplot2::ggplot_build(y), silent = TRUE) | ||
NextMethod() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#' How many layers are in a plot? | ||
#' | ||
#' @param p A ggplot object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#' List the stats used by a plot | ||
#' | ||
#' \code{get_stats} returns a vector of stats names, written as character | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,3 +76,4 @@ reference: | |
- get_default_labels | ||
- get_default_params | ||
- default_label | ||
- gradethis_equal.ggplot |