script_newest: selects newest version of an R script

Description Usage Arguments Value Examples

View source: R/script_newest.R

Description

Selects the newest function of an R script, and sources it (default). Makes sourcing a script easier to read than source() in itself, when using some form of scriptnaming where the project-name is also included in the script. Throws an error if several versions of the same scripts exists. Requires a naming convention with

Usage

1
script_newest(script, dir = "r/", extension = "r", path = TRUE, source = TRUE)

Arguments

dir

directory to search in

extension

extension to look for

path

should the path be returned or just the script name?

source

should the script be sourced? defaults to TRUE

Value

This function returns the url blah blah blah

Examples

1
2
3
4
## Not run: 
function(arg1)

## End(Not run)

emilBeBri/dttools documentation built on April 21, 2021, 5:44 a.m.