export_code.Rd
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")
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" |
OUTPUT_DESCRIPTION
DETAILS
# 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/") # }