You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
927B

  1. # Created by use_targets().
  2. # Follow the comments below to fill in this target script.
  3. # Then follow the manual to check and run the pipeline:
  4. # https://books.ropensci.org/targets/walkthrough.html#inspect-the-pipeline
  5. # Load packages required to define the pipeline:
  6. library(targets)
  7. # Set target options:
  8. tar_option_set(
  9. packages = strsplit(desc::desc_get_field("Depends"), ", ")[[1]],
  10. # For distributed computing in tar_make(), supply a {crew} controller
  11. # as discussed at https://books.ropensci.org/targets/crew.html.
  12. controller = crew::crew_controller_local(workers = 2)
  13. )
  14. # Run the R scripts in the R/ folder with your custom functions:
  15. tar_source()
  16. # Replace the target list below with your own:
  17. list(
  18. tar_target(year, 2016:2023),
  19. tar_target(report, c("MY", "YE", "Q1", "Q2", "Q3", "Q4")),
  20. tar_target(
  21. doc_list,
  22. get_report_by_year_export(year, report),
  23. pattern = cross(year, report)
  24. )
  25. )