Skip to content

Commit

Permalink
dont run styler
Browse files Browse the repository at this point in the history
  • Loading branch information
Polkas committed Nov 21, 2024
1 parent 7ecb7c0 commit 50fb7a2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
18 changes: 10 additions & 8 deletions R/standalone-ggcall.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ ggplot <- function(...) {
#' plot_call <- ggcall(func(mtcars, "wt", "mpg"))
#' # Optionally: Style the code with styler
#' # deparse1 is recommended and available in R>=4.0.0
#' styler::style_text(
#' paste(deparse(plot_call, 500), collapse = " ")
#' )
#'
#' \dontrun{
#' styler::style_text(
#' paste(deparse(plot_call), collapse = "\n")
#' )
#' }
#' @export
#'
ggcall <- function(plot) {
Expand Down Expand Up @@ -188,10 +189,11 @@ ggcall <- function(plot) {
#' plot_call <- ggcall(func(mtcars, "wt", "mpg"))
#' # Optionally: Add assignments
#' plot_call_with_assignments <- ggcall_add_assignments(plot_call)
#' styler::style_text(
#' paste(deparse(plot_call_with_assignments), collapse = "\n")
#' )
#'
#' \dontrun{
#' styler::style_text(
#' paste(deparse(plot_call_with_assignments), collapse = "\n")
#' )
#' }
#' eval_ggcall(plot_call_with_assignments)
#'
#' # Will Fail as data is needed and skipped
Expand Down
9 changes: 5 additions & 4 deletions man/ggcall.Rd

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

9 changes: 5 additions & 4 deletions man/ggcall_add_assignments.Rd

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

0 comments on commit 50fb7a2

Please sign in to comment.