knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
So, we now include a bare-bones {targets} project template that you can use
using flowme::targetsme()
or flowme::use_targets()
, which includes
the following files in your current project:
example_dir <- fs::dir_create(paste0(tempdir(), "/targets_example")) xfun::in_dir(example_dir, flowme::use_targets()) xfun::in_dir(example_dir, fs::dir_tree(all = TRUE))
+-- .gitignore +-- .Rbuildignore +-- .Rprofile +-- DESCRIPTION +-- tar_visnetwork.yml +-- _targets.R +-- R | \-- overrides.R +-- report | +-- .gitignore | +-- chapter1.Rmd | +-- chapter2.Rmd | +-- index.Rmd | +-- _bookdown.yml | +-- _output.yml | \-- _style.docx
The aims are similar to those of our {drake} template (see vignette("drakeme",
package = "flowme")
). But currently our {targets} template is very thin. It
only includes:
Fully functional {targets}
project at the push of a button: once installed,
flowme
helps you setup a project
(flowme::targetsme()
) that you can actually
run (targets::tar_make()
) and see the output.
Prepares the environment in .Rprofile
and leaves _targets.R
script
only to define your pipeline. (we are not convinced yet on this approach,
but let's see how it goes)
Includes a bookdown
-based report/book in the pipeline, now using a target
factory in flowme::tar_bookdown()
. Again, you simply add
Rmd
files to the "report" folder and you are good to go.
Again, the big picture plan should be defined in _targets.R
,
by binding together sub-plans. Here we still prefer drake-like syntax
and therefore we will use tarchetypes::tar_plan
within functions to help
navigating the project.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.