Skip to content

Commit

Permalink
Update un-reprexing examples to use new outfile argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Mar 2, 2018
1 parent 2c60e78 commit 95ffb3d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
15 changes: 7 additions & 8 deletions R/reprex-undo.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ NULL
#' #' More text
#' y <- 2:5
#' x + y
#' }, show = FALSE, advertise = FALSE)
#' writeLines(x)
#' x <- reprex_invert(x)
#' writeLines(x)
#' }, show = FALSE, advertise = FALSE, outfile = "roundtrip-input")
#' x <- reprex_invert(x, outfile = "roundtrip-output")
#' x
#' }
reprex_invert <- function(input = NULL,
outfile = NULL,
Expand Down Expand Up @@ -78,8 +77,8 @@ reprex_invert <- function(input = NULL,
#' "median(x)",
#' "#> [1] 2.5"
#' )
#' out <- reprex_clean(x)
#' writeLines(out)
#' out <- reprex_clean(x, outfile = "commented-code")
#' out
#'
#' ## round trip with reprex(..., venue = "R")
#' code_in <- c("x <- rnorm(2)", "min(x)")
Expand Down Expand Up @@ -109,8 +108,8 @@ reprex_clean <- function(input = NULL,
#' "> median(x)",
#' "[1] 2.5"
#' )
#' out <- reprex_rescue(x)
#' writeLines(out)
#' out <- reprex_rescue(x, outfile = "live-transcript")
#' out
#' }
reprex_rescue <- function(input = NULL,
outfile = NULL,
Expand Down
15 changes: 7 additions & 8 deletions docs/reference/un-reprex.html

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

15 changes: 7 additions & 8 deletions man/un-reprex.Rd

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

0 comments on commit 95ffb3d

Please sign in to comment.