Learn R Programming

miceadds (version 1.5-0)

source.all: RUtilities: Source All R Files Within a Directory

Description

Sources all Rfiles within a specified directory.

Usage

source.all( path , grepstring="\\.R",  print.source=TRUE )

Arguments

path
Path where the files are located
grepstring
Which strings should be looked for? grepstring can also be a vector.
print.source
An optional logical whether the source process printed on the console?

Examples

Run this code
# define path
path <- "c:/myfiles/"
# source all files containing the string 'Rex'
source.all( path , "Rex" )

Run the code above in your browser using DataLab