From ernest.turro at ic.ac.uk  Wed Apr 25 13:43:53 2007
From: ernest.turro at ic.ac.uk (Ernest Turro)
Date: Wed, 25 Apr 2007 12:43:53 +0100
Subject: [Rd] R-2.5.0 and unlink/wildcards
In-Reply-To: <Pine.LNX.4.64.0704251234500.7115@gannet.stats.ox.ac.uk>
References: <F4683CA2-ACD2-4647-9C1D-0C4A01892B1E@ic.ac.uk>
	<Pine.LNX.4.64.0704251234500.7115@gannet.stats.ox.ac.uk>
Message-ID: <A07E9250-6199-4DE7-B73B-6C646CEF12BA@ic.ac.uk>

Thanks, this now works.

I'd just like to mention that Sys.glob() wasn't necessary in 2.4.1  
and this potential requirement should perhaps be mentioned in ?unlink.

Thanks

E

On 25 Apr 2007, at 12:38, Prof Brian Ripley wrote:

> 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



[Rd] R-2.5.0 and unlink/wildcards
Ernest Turro