source_directory: Source all R scripts in a directory

View source: R/source_directory.R

source_directoryR Documentation

Source all R scripts in a directory

Description

This function sources all the R scripts in a given directory by calling the source() function on each file with a ".R" extension. This function can be used to easily source all the scripts in a directory.

Usage

source_directory(dir_path, recursive = TRUE)

Arguments

dir_path

A character string specifying the path to the directory containing the R scripts to be sourced.

recursive

list recurisvely into the directory being sourced

Value

This function has no return value.

Examples

# Source all R scripts in the current working directory
source_directory(getwd())

# Source all R scripts in a specific directory
source_directory("/path/to/your/directory")


natehall329/nate_utils documentation built on Dec. 31, 2024, 3:25 p.m.