Closed wlandau closed 4 hours ago
To elaborate: targets
currently does this:
deparse(structure(list(a = 1), class = "b"), control = c("keepNA", "keepInteger"))
#> [1] "list(1)"
I am proposing that it do this:
deparse(structure(list(a = 1), class = "b"), control = c("keepNA", "keepInteger", "niceNames", "showAttributes"))
#> [1] "structure(list(a = 1), class = \"b\")"
This will make tar_map()
and tar_map_rep()
easier to use.
Options "niceNames" and "showAttributes" have been part of
.deparseOpts()
since https://github.com/wch/r-source/blob/6363ed6d31e6b0637836728138f21fff5a126905/doc/NEWS.3.Rd#L1537-L1543. I think I was resistant to adding these initially because they seemed recent additions to R, but they have been around since R 3.5.0, which is the minimum version oftargets
. Adding them would improve the user experience for cases like https://github.com/ropensci/tarchetypes/issues/94.