[Rd] [BioC] Errors using biocLite on Apple OS X
Steven McKinney
smckinney at bccrc.ca
Wed Jul 19 02:15:33 CEST 2006
The warnings from
make.packages.html()
on the Apple Mac OS X platform can be dealt
with as follows:
------------------------------------------------
(1)
make.packages.html() uses the function tempdir()
and attempts to create a temporary
directory in the default location /tmp/
which fails due to the /tmp directory
architecture on the Mac.
I set up a .Renviron file in my user account directory,
/Users/stevenmckinney/.Renviron
containing the *nix environment variable
TMPDIR="/Users/stevenmckinney/tmp"
Now the tempdir() function returns a directory
in a location that my user account has write access to:
> tempdir()
[1] "/Users/stevenmckinney/tmp/Rtmp1zKvhp"
--------------------------------------------
(2)
The function make.packages.html() attempts to
create a couple of files, but fails on Mac OS X.
Apparently a directory must already exist for file.create()
to successfully establish a new file in it.
> make.packages.html
function (lib.loc = .libPaths())
{
f.tg <- file.path(tempdir(), ".R/doc/html/packages.html")
if (!file.create(f.tg)) {
warning("cannot create HTML package index")
return(FALSE)
}
searchindex <- file.path(tempdir(), ".R/doc/html/search/index.txt")
if (!file.create(searchindex)) {
warning("cannot create HTML search index")
return(FALSE)
}
useUTF8 <- capabilities("iconv")
I modified the two file.create() bits to also include
a directory create. On Mac OS X, you have to specify
the recursive arg to the dir.create() function, or it
will fail to create a subdirectory several levels deep.
First check if the subdirectory exists; if not, create it;
then create the file within it.
make.packages.html <-
function (lib.loc = .libPaths())
{
f.tg <- file.path(tempdir(), ".R/doc/html/packages.html")
if (!((file.exists(dirname(f.tg)) ||
dir.create(dirname(f.tg), recursive = TRUE)) &&
file.create(f.tg))) {
warning("cannot create HTML package index")
return(FALSE)
}
searchindex <- file.path(tempdir(), ".R/doc/html/search/index.txt")
if (!((file.exists(dirname(searchindex)) ||
dir.create(dirname(searchindex), recursive = TRUE)) &&
file.create(searchindex))) {
warning("cannot create HTML search index")
return(FALSE)
}
useUTF8 <- capabilities("iconv")
When I run this redefined version, it runs to completion
without warning.
However, when biocLite() runs, it does not access my
redefined make.packages.html() in .Globalenv - the
bioclite() call appears to always call the package:utils
copy of this function.
Perhaps such modifications could be done by package:utils
developers?
Thanks to Herve Pages for his excellent
summarization of the issues arising when
running biocLite on the Mac.
Steven McKinney
Statistician
Molecular Oncology and Breast Cancer Program
British Columbia Cancer Research Centre
email: smckinney at bccrc.ca
tel: 604-675-8000 x7561
BCCRC
Molecular Oncology
675 West 10th Ave, Floor 4
Vancouver B.C.
V5Z 1L3
Canada
-----Original Message-----
From: Herve Pages [mailto:hpages at fhcrc.org]
Sent: Tue 7/18/2006 12:51 PM
To: Steven McKinney
Cc: Bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] Errors using biocLite on Apple OS X
Hi Steven,
I can see warnings only in what you reported. These warnings
are well-known issues but are not biocLite problems: they are
Mac OS X install.packages() specific issues.
The first warning:
1: number of rows of result
is not a multiple of vector length (arg 2) in: cbind(1, res0,
Repository = repos)
is issued by install.packages() when it is given a repos vector with
length >= 4.
You can easily reproduce it with:
> repos <- c("http://bioconductor.org/packages/1.8/bioc",
"http://bioconductor.org/packages/1.8/data/annotation",
"http://bioconductor.org/packages/1.8/data/experiment",
"http://bioconductor.org/packages/1.8/omegahat",
"http://bioconductor.org/packages/1.8/lindsey",
"http://cran.fhcrc.org")
> install.packages("Biobase", repos=repos)
The second warning is a permission issue specific to Mac OS X.
Anyway, these warnings should not prevent biocLite to install the requested
packages correctly.
Cheers,
H.
Steven McKinney wrote:
> I've recently started using R and Bioconductor
> on an Apple Mac running OS X (10.4). I've been
> installing packages from the *nix command line,
> one by one, no trouble.
>
> I would like to be able to update using
> biocLite from the R gui, but keep getting
> errors.
>
>
>> version
> _
> platform powerpc-apple-darwin8.6.0
> arch powerpc
> os darwin8.6.0
> system powerpc, darwin8.6.0
> status
> major 2
> minor 3.1
> year 2006
> month 06
> day 01
> svn rev 38247
> language R
> version.string Version 2.3.1 (2006-06-01)
>
>
>> source("http://bioconductor.org/biocLite.R")
>> biocLite("Biobase", destdir =
>> "/Volumes/KilroyHD/kilroy/Software/BioConductor")
> Running getBioC version 0.1.6 with R version 2.3.1
> Running biocinstall version 1.8.4 with R version 2.3.1
> Your version of R requires version 1.8 of Bioconductor.
> trying URL
> 'http://bioconductor.org/packages/1.8/bioc/bin/macosx/powerpc/contrib/2.3/Biobase_1.10.1.tgz'
> Content type 'application/x-gzip' length 1465858 bytes
> opened URL
> ==================================================
> downloaded 1431Kb
>
> Warning messages:
> 1: number of rows of result
> is not a multiple of vector length (arg 2) in: cbind(1, res0,
> Repository = repos)
> 2: cannot create HTML package index in: make.packages.html()
>
>
> I am using version 1.10.1 of Biobase, I presume this is the
> version number for Bioconductor.
>
> I see a few others reporting similar errors
> when I google this issue, but I see no posted
> solutions. Can anyone see what I am doing wrong,
> and is there a solution?
>
> Any info appreciated
>
>
> Best regards
>
> Steven McKinney
>
> Statistician
> Molecular Oncology and Breast Cancer Program
> British Columbia Cancer Research Centre
>
> email: smckinney at bccrc.ca
>
>
>
> BCCRC
> Molecular Oncology
> 675 West 10th Ave, Floor 4
> Vancouver B.C.
> V5Z 1L3
> Canada
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
--
------------------------
Hervé Pagès
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the R-devel
mailing list