Created
December 18, 2025 19:58
-
-
Save tonyelhabr/9d0545bb32bd8f81d44c9a760c7fc04e to your computer and use it in GitHub Desktop.
Print R dataframe like a reprex
This file contains hidden or 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
| reprex_print <- function(...) { | |
| capture.output(...) |> | |
| paste('#>', x = _) |> | |
| cat(sep = '\n') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment