Skip to content

Instantly share code, notes, and snippets.

@GuiMarthe
Created November 25, 2025 23:16
Show Gist options
  • Select an option

  • Save GuiMarthe/1881ac04b434fc05d598cf6045f60060 to your computer and use it in GitHub Desktop.

Select an option

Save GuiMarthe/1881ac04b434fc05d598cf6045f60060 to your computer and use it in GitHub Desktop.
A nice way to debug objects in quarto
```{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