From rpeng at jhsph.edu  Sun Feb  1 04:07:51 2004
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Sun Feb  1 04:08:09 2004
Subject: [Rd] bzfile() in R
In-Reply-To: <20040201015007.GA8052@sonny.eddelbuettel.com>
References: <401C5841.5090500@jhsph.edu>
	<20040201015007.GA8052@sonny.eddelbuettel.com>
Message-ID: <401C6D87.7030801@jhsph.edu>

Yes, that's true, but I was under the impression that since the 
bzip2 sources are included with the R sources, that the bzip2 
capability is always compiled in (either using the included 
sources or a system library).  Also, the NEWS file for 1.9.0 says:

     o   configure no longer lists bzip2 and PCRE as `additional
         capabilities' as all builds of R have had them since 		 
1.7.0.

-roger

Dirk Eddelbuettel wrote:

> On Sat, Jan 31, 2004 at 08:37:05PM -0500, Roger D. Peng wrote:
> 
>>I'm putting together a data package and am finding that I get 
>>enormous savings in space by using bzip instead of the usual gzip 
>>in save().  Is it safe to assume that for R versions, say >= 
>>1.7.1, that the function bzfile() will always be available?
> 
> 
> I don't think that is correct as this an optional compile-team feature.
> 
> help(bzfile) says it 'may' be present whereas gzfile is guaranted (from a
> 1.9.0 snapshot):
> 
>      All platforms support (gz)file connections and 'url("file://")'
>      connections.  The other types may be partially implemented or not
>      implemented at all.  (They do work on most Unix platforms, and all
>      but 'fifo' on Windows.)
> 		    
> but then goes on to say under See Also:
> 
>      'capabilities' to see if 'gzfile', 'url', 'fifo' and
>      'socketConnection' are supported by this build of R.
> 
> which suggests that even gzfile may not be guaranteed.
> 
> You could of course test via capabilities() and abort with a clear error.
> 
> Dirk
>


[Rd] bzfile() in R
Roger D. Peng