getRFiles: List all R Files in a Directory

View source: R/RFiles.R

getRFilesR Documentation

List all R Files in a Directory

Description

This is a very simple wrapper for list.files to get all the R files in a directory and, by default, recursively for sub-directories. This simply sets the defaults for a call to list.files for R files.

Usage

getRFiles(dir, pattern = "\\.[RrSsQq]$", recursive = TRUE)

Arguments

dir

the path to the directory to search for R files

pattern

the pattern to identify the files of interest

recursive

a scalar logical controlling whether to process sub-directories and their sub-directories, etc.

Value

A character vector

Author(s)

Duncan Temple Lang

See Also

list.files


duncantl/CodeAnalysis documentation built on June 12, 2025, 6:44 a.m.