Write data R script

dpr_write_script(
  folder_dir,
  r_read = "",
  r_folder_write = "data-raw",
  r_write = "",
  append_file = FALSE
)

Arguments

folder_dir

is the folder on your local computer where you store your git repository

r_read

either a path to an R script, the clipboard if `NULL`, or an `rlang::expr` object.

r_folder_write

a path to a folder where the R script will be written

r_write

the name of the file to write contents of `r_read`

append_file

Whether to append `TRUE` or overwrite `FALSE` (default) the file `r_write`.