Convert R objects to proper R code strings for generating .qmd files
dot-serialize_arg.RdInternal function that converts R objects into properly formatted R code strings for inclusion in generated Quarto markdown files. Handles various data types and preserves special cases like data references.
Details
This function handles:
NULL values -> "NULL"
Character strings -> quoted strings with escaped quotes
Numeric values -> unquoted numbers
Logical values -> "TRUE"/"FALSE"
Named lists -> "list(name1 = value1, name2 = value2)"
Unnamed lists -> "list(value1, value2)"
Special identifiers like "data" -> unquoted
Complex objects -> deparsed representation