Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "niceNames" and "showAttributes" to deparse options #1375

Closed
wlandau opened this issue Nov 14, 2024 · 1 comment
Closed

add "niceNames" and "showAttributes" to deparse options #1375

wlandau opened this issue Nov 14, 2024 · 1 comment
Assignees

Comments

@wlandau
Copy link
Member

wlandau commented Nov 14, 2024

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 of targets. Adding them would improve the user experience for cases like ropensci/tarchetypes#94.

@wlandau wlandau self-assigned this Nov 14, 2024
@wlandau
Copy link
Member Author

wlandau commented Nov 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant