File: sourceDirectory.Rd

package info (click to toggle)
r-cran-r.utils 2.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,864 kB
  • sloc: sh: 18; makefile: 6
file content (63 lines) | stat: -rw-r--r-- 2,018 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
% 
%  sourceDirectory.R
% 
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\name{sourceDirectory}
\alias{sourceDirectory.default}
\alias{sourceDirectory}

\title{Sources files recursively to either local or global environment}

\description{
 Sources files recursively to either local or global environment.
}

\usage{
\method{sourceDirectory}{default}(path, pattern=".*[.](r|R|s|S|q)([.](lnk|LNK))*$", recursive=TRUE,
  envir=parent.frame(), onError=c("error", "warning", "skip"), modifiedOnly=TRUE, ...,
  verbose=FALSE)
}

\arguments{
 \item{path}{A path to a directory to be sourced.}
 \item{pattern}{A regular expression file name pattern to identify
       source code files.}
 \item{recursive}{If \code{\link[base:logical]{TRUE}}, subdirectories are recursively sourced
       first, otherwise not.}
 \item{envir}{An \code{\link[base]{environment}} in which the code should be evaluated.}
 \item{onError}{If an error occurs, the error may stop the job,
       give a warning, or silently be skipped.}
 \item{modifiedOnly}{If \code{\link[base:logical]{TRUE}}, only files that are modified since the
       last time they were sourced are sourced, otherwise regardless.}
 \item{...}{Additional arguments passed to \code{\link{sourceTo}}().}
 \item{verbose}{A \code{\link[base]{logical}} or a \code{\link{Verbose}} object.}
}

\value{
 Returns a \code{\link[base]{vector}} of the full pathnames of the files sourced.
}

\section{Details}{
  Subdirectories and files in each (sub-)directory are sourced
  in lexicographic order.
}

\section{Hooks}{
 This method does not provide hooks, but the internally used
 \code{\link{sourceTo}}() does.
}

\seealso{
  \code{\link{sourceTo}}() and compare to \code{\link[base]{source}}().
}

\author{Henrik Bengtsson}



\keyword{IO}
\keyword{programming}