Created
November 25, 2025 23:16
-
-
Save GuiMarthe/1881ac04b434fc05d598cf6045f60060 to your computer and use it in GitHub Desktop.
A nice way to debug objects in quarto
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
| ```{r} | |
| log_str <- function(object, file = "debug.log") { | |
| str_output <- capture.output(str(object)) | |
| cat(str_output, file = file, sep = "\n", append = F) | |
| } | |
| log_str(object, 'debug.log') | |
| log_str(params$object1, 'debug2.log') | |
| log_str(params$object2x, 'debug3.log') | |
| ``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment