Learn R Programming

miceadds (version 2.10-14)

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

Description

Sources all R files 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
# NOT RUN {
# 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