copy_script: Copy script to project directory

Description Usage Arguments

View source: R/new_script.R

Description

Will search code library and copy script and dependencies into scripts directory. Script will also be stamped with source location, time and user information

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
copy_script(
  from,
  file_name = basename(from),
  dir = scripts_dir(proj_path),
  dependencies = TRUE,
  stamp_copy = TRUE,
  overwrite = FALSE,
  comment_char = "#",
  alt_paths,
  proj_path = "."
)

Arguments

from

character. file name or path of file to copy

file_name

character. file name. default = same as from

dir

character. directory to copy to, default "Scripts"

dependencies

logical. Default = TRUE. will script copy dependencies

stamp_copy

logical. Create a commented timestamp at beginning of file

overwrite

logical. Overwrite 'to' file if exists?

comment_char

character. Comment character

alt_paths

character vector. paths to other candidate files to search

proj_path

character. Default = current working directory. path to tidyproject


tsahota/tidyproject documentation built on April 19, 2021, 9:15 p.m.