R-Forge logo
  

Log In
New Account

 
 
 
Home
My Page
Project Tree
distr - S4 classes for distributions
 
 
alt
 
Summary Forums Tracker Lists News SCM R Packages
 
alt

distr: pkg/utils/README-R-utils

File: [distr] / pkg / utils / README-R-utils (download)
Revision: 623, Sun Nov 1 10:10:10 2009 UTC (3 weeks ago) by stamats
File size: 6767 byte(s)
merged branch 2.2 into trunk
#####################################################
# Howto to R - utils -- version 2.2 (040909)
#####################################################

########### R - Utils

### finde.R :
#
# searches for a given pattern (possibly with regular expressions)
# in all files with a given file extension in a given folder
# Syntax

finde(x = "nchar", dir="C:/rtest/distrEx/R", ext = "R", rec = FALSE)
## args: x : pattern; dir: folder; ext: file extension, rec: recursive in subfolders?

### ladealles.R
#
# sources in all .R - files from a given folder
# Syntax

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

### compare.R :
#
# compares (recursively over all slots / list elements)
# two objects, i.e. it prints the corresponding slots of object1
# directly on top of the corresponding slots of object2
# Syntax

compare(obj1, obj2, level = 0)
## obj1,obj2: objects to compare; level: used internally for indentation

### setNewEmail.R

# automatically changes an e-mail adress in all (Text)-
# package files: (with extension .R, .Rd, .Html, .htm, .TeX, .Rnw)
# and in corresponding HTML-folders as well as in the DESCRIPTION files

### setNewRVersion.R

# automatically updates date and version information in a series
# of package files:
#       + for pkgname in packs:
#         in DESCRIPTION
#             * package version
#             * Date
#             * required R version
#         if pkgname == distrDoc:
#            in distr.Rnw file
#               * change pkg-, pkgEx- version
#         if withHTML  in .html file
#             * on top :
#               - package version
#               - release Date
#               - required R version
# no longer from version 2.0 on:
#             * at "Download" (if not already there)
#                - Win-zip-file      information and URL-link
#                - Linux-tar-gz-file information and URL-link
# end: no longer from version 2.0 on
#             * at "Changes" (if not already there)
#                - header "Changes from <old-pkg-version> to <pkg-version>
#                - template list
#             * on bottom of file:
#                - "last updated on" - Date
#       + if rkurs:
#         in rkurs.tex:
#             * package version of distr-family
# Syntax

setNewversion(
              dev.dir = "C:/rtest/",
              packs = c("startupmsg",
                        "distr",
                        "distrEx",
                        "distrDoc",
                        "distrSim",
                        "distrTEst",
                        "distrTeach",
                        "distrMod",
                        "robKalman",
                        "Benchmark"),
              packs.dir = paste(dev.dir, c(rep("distr/pkg",8),
                               "robKalman/pkg",""), sep=""),
              packs.ver = c("0.5", rep("2.0",7),"0.2","2.4"),
              packs.gtR = c(rep("2.2.0",8),"2.3.0",""),
              withHTML = TRUE,
              packs.HTML.dir = c("", paste(dev.dir,
                     c(rep("distr/www",7),"robKalman/www"),
                                      sep=""),""),
              rkurs = TRUE,
              rkursDir = "D:/Eigene Dateien/Arbeit/R-Kurs/"
              )
## args: dev.dir:         folder where packages are developped (as folders...)
##       packs:           vector of (names of) packages to be updated
##       packs.dir:       vector of same length as packs;
##                        names of the [/pkg if R-Forge] folders to the  packages
##       packs.ver:       vector of same length as packs;
##                        versions of the packages
##       packs.gtR:       vector of same length as packs;
##                        required R versions for the packages
##       packs.HTML.dir:  vector of same length as packs;
##                        names of the [/www if R-Forge] HTML folders to the packages
##       rkurs:         is R-Kurs to be updated?
##       rkursDir:      folder of R-Kurs
##       withHTML:      are HTML files to be updated?


### showAllFiles.R

# concatenate all TOBEDONE or similar files to one output


# Syntax

showAllFiles( type = "TOBEDONE$", dir = "C:/rtest/distr/",
              except = NULL, con = stdout()
                         ){
## args:  type:   type of Files to be concatenated (with regular expressions!)
##                typically something like
##                DESCRIPTION, NEWS, LICENSE, TOBEDONE, CITATION
##        dir:    top folder from which to recurse
##        except: exclude files matching this regular expressions
##        con:    outbound connection (usually stdout, but may be file too)

### some examples
if(FALSE){
 showAllFiles()
 showAllFiles(Type="NEWS", except="www")
 showAllFiles(dir="C:/rtest/robast")
}


### showsvnlog.R

# shows svn log information;
#   requires + bash shell (may be from cygwin!)
#                             + svn (not TortoiseSVN, but either cygwin-svn or tigris svn for Linux)

# Syntax
showsvnlog( pathRepo = "distr", inRforge = TRUE, withlogin = TRUE,
            PathToBash = "C:/cygwin/bin/bash",
            PathToUtils = "C:/rtest/distr/branches/distr-2.2/pkg/utils",
            fromRev = 501, toRev = 502, limit = 100,
            tmpfile = "C:/rtest/tmp-svnlog3.txt",
            con = stdout(), withChPaths = FALSE )
## args:  pathRepo:    the svn project name; in case of r-forge: project name suffices
##        inRforge:    do we use r-forge as repository
##                     (otherwise need full URL for arg. "pathRepo"
##        withlogin:   do we need option "--login" (yes in cygwin, don't know in Linux)
##        PathToBash:  path to bash-shell
##        PathToUtils: path to shell script readsvnlog.sh
##        fromRev:     arg for svn log --- first log-listed revision
##        toRev:       arg for svn log --- last log-listed revision;
##                     may be Inf or <0 => then use HEAD revision
##        limit:       how many revisions will be shown atmost
##        tmpfile:     some tmpfile to which we write the
##                     results temporarily; is deleted afterwords
##        con:         results are written to con; by default stdout, but
##                     may also be a file
##        withChPaths: shall changed files/paths be reported ?
##                     (^= verbose option of svn log)

### some examples
if(FALSE){
showsvnlog(from=500,to=520)
showsvnlog(from=300,to=Inf,limit=1000)
}

CVS/SVN Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS/SVN Help

alt
alt alt alt
alt


Thanks to:
Vienna University of Economics and Business Administration University of Wisconsin - Madison Powered By GForge Collaborative Develo
pment Environment JavaHispano