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

New shorthand for branching over file stems #5

Closed
3 tasks done
wlandau opened this issue Aug 7, 2020 · 0 comments
Closed
3 tasks done

New shorthand for branching over file stems #5

wlandau opened this issue Aug 7, 2020 · 0 comments
Assignees

Comments

@wlandau
Copy link
Member

wlandau commented Aug 7, 2020

Prework

  • I understand and agree to tarchetypes' code of conduct.
  • I understand and agree to tarchetypes' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

From ropensci/targets#136, it takes two targets to branch over a file stem.

list(
  tar_target(paths, c("a.csv", "b.csv")),
  tar_target(files, paths, pattern = map(paths), format = "file")
)

We should define a new target archetype to condense this down to one line.

tarchetypes::tar_files(files, c("a.csv", "b.csv"))
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