[Rd] R-2.5.0 and unlink/wildcards

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Apr 25 13:38:55 CEST 2007


This is shell-dependent on a Unix-alike, but Sys.glob() should work.  So 
try

unlink(Sys.glob("run.*"), recursive=TRUE)


On Wed, 25 Apr 2007, Ernest Turro wrote:

> It seems unlink doesn't work with wildcards in 2.5.0. I've tried
> R-2.5.0 under gnu/linux from source and the Mac binary from att
> research. Example:
>
> > dir()
> [1] "bgx.Rnw" "bgx.pdf" "run.1"
> > unlink("run.*",recursive=T)
> > dir()
> [1] "bgx.Rnw" "bgx.pdf" "run.1"
> > unlink("run.1",recursive=T)
> > dir()
> [1] "bgx.Rnw" "bgx.pdf"

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list