[Distr-commits] r74 - pkg/utils

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 16 03:26:05 CET 2008


Author: ruckdeschel
Date: 2008-02-16 03:26:05 +0100 (Sat, 16 Feb 2008)
New Revision: 74

Modified:
   pkg/utils/README-R-utils
   pkg/utils/ladealles.R
Log:
minor enhancement in ladealles.R

Modified: pkg/utils/README-R-utils
===================================================================
--- pkg/utils/README-R-utils	2008-02-16 00:36:12 UTC (rev 73)
+++ pkg/utils/README-R-utils	2008-02-16 02:26:05 UTC (rev 74)
@@ -18,9 +18,10 @@
 # sources in all .R - files from a given folder
 # Syntax 
 
-ladeall(DIR="distr", develDir = "C:/rtest")
+ladeall(DIR="distr", develDir = "C:/rtest", pattern = "")
 ## args: DIR :     relative path to folder starting from develDir
 ##       develDir: development folder (absolute path) 
+##       pattern:  regexpr. for files to be sourced in
 
 ### setNewRVersion.R
 

Modified: pkg/utils/ladealles.R
===================================================================
--- pkg/utils/ladealles.R	2008-02-16 00:36:12 UTC (rev 73)
+++ pkg/utils/ladealles.R	2008-02-16 02:26:05 UTC (rev 74)
@@ -1,8 +1,8 @@
- ladeall <- function(DIR="distr", develDir = "C:/rtest/distr/pkg"){
+ ladeall <- function(DIR="distr", develDir = "C:/rtest/distr/pkg",pattern=""){
  od <- getwd()
  print(file.path(develDir,DIR, "R"))
  setwd(file.path(develDir,DIR, "R"))
- lapply(grep(".R$",dir(),value=T),source)
+ lapply(grep(paste(pattern,".R$",sep="",collapse=""),dir(),value=T),source)
  setwd(od)
 }
 



More information about the Distr-commits mailing list