This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--27464147-75857366-1187539630=:10054
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT
The documented specification is file:///d:/CRAN (as specified by RFC1738),
so this is working correctly.
The CHANGES file for 2.2.0 says:
o file:// URLs are now interpreted by download.file(),
download.packages() and url() in the same way as Mozilla-based
browsers. That is, the expected form is
file:///d:/path/to/file
with *three* slashes.
The point is that this is file:// + host + / + path/to/file, and host is
missing. That some versions of IE did not follow the standard is part of
the confusion here.
Note that ?available.packages does say
If a repository is
local, i.e., the URL starts with '"file:"', then the packages are
not downloaded but used directly. (Both '"file:"' and
'"file:///"' are allowed as prefixes to a file path, the latter
for an absolute file path.)
but 'file:' does not work with drives on Windows. That seems clearly to
rule out your usage.
On Fri, 10 Aug 2007, zivan.karaman at gmail.com wrote:
Full_Name: Zivan Karaman Version: 2.5.1 OS: Windows XP SP2 Submission from: (NULL) (195.6.68.214) I think that I have encountered a bug in the function "available.packages" when using a local repository (file://
) on Windows.
Version information:
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 5.1
year 2007
month 06
day 27
svn rev 42083
language R
version.string R version 2.5.1 (2007-06-27)
I have made a copy of the CRAN "/bin/windows/contrib/2.5" directory in the
"D:/CRAN" folder on my machine.
When I issue the command:
available.packages(contrib.url("file://D:/CRAN"))
I get the follwoing message:
Error in gzfile(file, "r") : unable to open connection
In addition: Warning message:
cannot open compressed file ':/CRAN/bin/windows/contrib/2.5/PACKAGES' in:
gzfile(file, "r")
Looking at the source code, I've spotted the following lines which seem to cause
trouble:
if (.Platform$OS.type == "windows") {
if (length(grep("[A-Za-z]:", tmpf)))
tmpf <- substring(tmpf, 2)
}
Deleting them, the function works OK.
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
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 --27464147-75857366-1187539630=:10054--