source.all.Rd
The function source.all
sources all R files within a specified directory and
is based on base::source
.
The function source.Rcpp.all
sources all Rcpp files within a specified directory
and is based on Rcpp::sourceCpp
.
The function rcpp_create_header_file
creates a cpp header file for a Rcpp
file.
source.all( path, grepstring="\\.R", print.source=TRUE, file_sep="__" )
source.Rcpp.all( path, file_names=NULL, ext="\\.cpp", excl="RcppExports",
remove_temp_file=FALSE )
rcpp_create_header_file(file_name, pack=NULL, path=getwd() )
Path where the files are located
Which strings should be looked for?
grepstring
can also be a vector.
An optional logical whether the source process printed on the console?
String at which file name should be split for looking for most recent files
Optional vector of (parts of) file names
File extension for Rcpp files
String indicating which files should be omitted from sourcing
Logical indicating whether temporary Rcpp files should be removed.
File name
Optional string for package
For loading header files, the line // [include_header_file]
has to be included
before loading the header file using a line of the form
#include "my_function.h"
.
if (FALSE) {
# define path
path <- "c:/myfiles/"
# source all files containing the string 'Rex'
source.all( path, "Rex" )
}