use_rmd: use_rmd

Description Usage Arguments Details Value Author(s)

View source: R/use_dflow.R

Description

Create an RMarkdown file and generate target definition code.

Usage

1
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


MilesMcBain/dflow documentation built on Aug. 15, 2020, 11:22 a.m.