SCM

SCM Repository

[tm] Diff of /pkg/R/source.R
ViewVC logotype

Diff of /pkg/R/source.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1274, Sun Jan 5 10:51:18 2014 UTC revision 1285, Sat Jan 11 09:31:10 2014 UTC
# Line 41  Line 41 
41          warning("invalid position")          warning("invalid position")
42      else if (!is.logical(x$Vectorized))      else if (!is.logical(x$Vectorized))
43          warning("invalid indicator for parallel element access")          warning("invalid indicator for parallel element access")
44      else if (isTRUE(x$Vectorized) && (is.na(x$Length) || x$Length <= 0))      else if (isTRUE(x$Vectorized) && (is.na(x$Length) || x$Length <= 0L))
45          warning("vectorized sources must have a positive length entry")          warning("vectorized sources must have a positive length entry")
46      else if (!is.null(x$Names) && !is.na(x$Names) &&      else if (!is.null(x$Names) && !is.na(x$Names) &&
47               (x$Length != length(x$Names)))               (x$Length != length(x$Names)))
# Line 71  Line 71 
71  DirSource <- function(directory = ".", encoding = "unknown", pattern = NULL, recursive = FALSE, ignore.case = FALSE) {  DirSource <- function(directory = ".", encoding = "unknown", pattern = NULL, recursive = FALSE, ignore.case = FALSE) {
72      d <- dir(directory, full.names = TRUE, pattern = pattern, recursive = recursive, ignore.case = ignore.case)      d <- dir(directory, full.names = TRUE, pattern = pattern, recursive = recursive, ignore.case = ignore.case)
73    
74      if (length(d) == 0)      if (!length(d))
75          stop("empty directory")          stop("empty directory")
76    
77      isfile <- !file.info(d)[["isdir"]]      isfile <- !file.info(d)[["isdir"]]

Legend:
Removed from v.1274  
changed lines
  Added in v.1285

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge