For use in creating a data repo, indicate all the code chunks used to create a specific subset of data

export_code(file, chunks, output_file, output_dir = "auto")

Arguments

file

The .Rmd file to parse

chunks

A character vector of the code chunk labels to keep

output_file

The filename to write to (no extension)

output_dir

The directory to write the file to (ending with trailing slash), Default: "auto"

Value

OUTPUT_DESCRIPTION

Details

DETAILS

See also

Examples

# NOT RUN {
# In the puddingR default directory
export_code("analysis.Rmd", chunks = c("load_data", "find_average"), output_file = "average")

#' # If not in the puddingR default directory
export_code("analysis.Rmd", chunks = c("load_data", "find_average"),
output_file = "average", output_dir = "myFolder/")
# }