option.R: option.R

Description Usage Arguments Value Examples

View source: R/option.R.R

Description

Processes a R file. Possible values for option are

""

do nothing with file

"default"

do nothing with file

"run"

base::source() file

Usage

1

Arguments

option

list: an option list to determine how the file is processed

file

character: file name

Value

nothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
file  <- system.file("helloworld.R", package="extpro")
# use a temporary directory
dir <- setwd(tempdir(TRUE))
file.copy(file, "helloworld.R")
#
opt <- option("run")
option.R(opt, "helloworld.R")
# show results
list.files()
setwd(dir)

sigbertklinke/extpro documentation built on Dec. 31, 2020, 7:26 a.m.