# NOT RUN {
plan <- drake::drake_plan(
small_data = download_data("https://some_website.com") %>%
select_my_columns() %>%
munge(),
large_data_raw = target(
command = download_data("https://lots_of_data.com") %>%
select_top_columns,
trigger = trigger(
change = time_last_modified("https://lots_of_data.com"),
command = FALSE,
depend = FALSE
),
timeout = 1e3
),
strings_in_dots = "literals"
)
print(plan)
if (requireNamespace("styler", quietly = TRUE)){
source <- drake_plan_source(plan)
print(source) # Install the prettycode package for syntax highlighting.
}
# }
# NOT RUN {
file <- tempfile() # Path to an R script to contain the drake_plan() call.
writeLines(source, file) # Save the code to an R script.
# }
Run the code above in your browser using DataLab