gen_rscript: Generate an R script with a preamble

Description Usage Arguments Value Examples

View source: R/gen_rscript.R

Description

Generate an R script with a preamble

Usage

1
gen_rscript(dir, filename, author, project, open_file = F)

Arguments

dir

The directory where the new script will be stored as a character string

filename

The R script file name as a character string (without extensions)

author

The author of the script as a character

project

Project name or script name that will appear in the preamble as character string.

open_file

Logical to whether you want to open the file with Rstudio after the function call

Value

Returns nothing. If open_file is TRUE, it will open the script.

Examples

1
2
3
4
# Only been tested with OSx El Capitan 10.11.6

gen_rscript(dir = ".", "new_script", "Jorge Cimentada", "new_project", FALSE)
# This should create a new R script in your working directory

cimentadaj/cimentadaj documentation built on Dec. 1, 2019, 5:22 p.m.