prepare_yaml: Prepare Default Targets and Prerequisites for Makefile

Description Usage Arguments Details Value Author(s)

View source: R/makefile.R

Description

prepare_yaml Obtains the yaml header of a Rmd document to add the default prerequisites and targets to be used in a Makefile.

Usage

1
prepare_yaml(file_rmd, dir_blog = "docs")

Arguments

file_rmd

File to obtain the initial yaml header. This should be relative to the project root path.

dir_blog

File to obtain the initial yaml header.

Details

The yaml header is checked to add the default target "html" file and the default prerequisite "Rmd" file. It append these default in case other targets and prerequisites have already been defined in the header file. These can be defined using a parameter starting with "targ" (e.g. targets: path/to/file.RData) for targets and a parameter starting with "prer" (e.g. prerequisites: path/to/req1.RData path/to/req2.RData) for prerequisites.

Value

A yaml list with added default target and prerequisite.

Author(s)

Erick A. Chacón-Montalván


ErickChacon/reprodown documentation built on Aug. 12, 2021, 9:59 p.m.