if (interactive()) {
# Create a temporary directory for testing
tmp_dir <- tempdir()
# Write a Quarto document with examples
write_quarto(path = tmp_dir, filename = "analysis", example = TRUE)
# Verify the file was created
file.exists(file.path(tmp_dir, "analysis.qmd"))
# Clean up
unlink(list.files(tmp_dir, full.names = TRUE), recursive = TRUE)
}
Run the code above in your browser using DataLab