Package 'dflow'

Title: Setup a project in the dflow style for using the drake
Description: Has a function that sets up an R workflow in the dflow style, using drake.
Authors: Miles McBain [aut, cre]
Maintainer: Miles McBain <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-12-16 03:29:00 UTC
Source: https://github.com/milesmcbain/dflow

Help Index


use_rmd_target

Description

Generate a target for an R markdown file

Usage

rmd_target(file_path)

Arguments

file_path

a file to generate target text for.

Value

target text to the console.

Author(s)

Miles McBain


use_dflow

Description

Setup a dflow project

Usage

use_dflow()

Details

Creates files and directories according to the dflow template.

Value

Nothing. Modifies your workspace.


use_gitignore

Description

Use a starter .gitignore

Usage

use_gitignore()

Details

Drop a starter .gitignore in the current working directory, including ignores for drake and capsule (renv).

Value

nothing, creates a file.

Author(s)

Miles McBain


use_rmd

Description

Create an RMarkdown file and generate target definition code.

Usage

use_rmd(target_file)

Arguments

target_file

a filename for the generated R markdown document.

Details

The generated document defaults to the "./doc" folder. This can be overridden with option 'dflow.report_dir'.

Due to the way RMarkdown and Knitr use relative paths to the source document it can be messy to properly tag the input and output documents for an Rmd target. This function will generate a multi-expression target using 'drake::target()' that uses a clean and simple way to mark these up for drake.

The contents of the 'file_out()' call my need to be modified depending on the output file extension and path configured in the Rmd and call to 'render()'.

Value

the path of the file created. (invisibly)

Author(s)

Miles McBain