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.htmlfunction (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
Steven, short story: now fixed in R-devel. The long story: On Jul 18, 2006, at 8:15 PM, Steven McKinney wrote:> The warnings from > > make.packages.html() > > on the Apple Mac OS X platform can be dealt > with as follows: >The warning appears for a completely different reason - make.packages.html() assumes that HTML help was started and created all necessary links which is not the case in the R Mac OS X GUI, until you request one of the temporarily generated pages. The idea of make.packages.html is to update the temporary copy of HTML documentation on installation such that packages list is up-to-date, but since the R GUI generates the files only on-demand, there is no need for such update if no temporary documentation was requested yet, and so updating doesn't make sense (and the warning can be ignored). The correct fix is not not run make.packages.html() at all if the temporarily generated list doesn't exist and I have fixed that now for R-devel. All your 'work-arounds' are bogus - may have asked on R-SIG-Mac to save you the trouble of going in a completely wrong direction - just invoke the main help page (<Cmd><?>) before installing and the temporary help files will be created.> ------------------------------------------------ > (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. >This is of course nonsense. Mac OS X uses /tmp as many other unix systems do and it is available (tempdir() works as well).> (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. >Yes, it fails because it expects the help system to have created them already and you're not supposed to mess with that manually. (Again, this is not Mac-specific - until help.start is invoked, the directories are not there on any unix).> 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. >Yes, that is intentional, thanks to namespaces.> Thanks to Herve Pages for his excellent summarization of the issues > arising when running biocLite on the Mac. >For the record, the other warning mentioned appears when installing from empty repositories - it is not Mac specific. (The lindsey repository is empty on Bioc, because none of the packages compiles). I have now also committed the fix (thanks to Seth for the correct analysis and fix). Cheers, Simon> -----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 > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >
Maybe Matching Threads
- [BioC] problem loading affycoretools (more details)
- png cairo device problems on Mac 10.6.8
- [BioC] Rcurl 0.8-1 update for bioconductor 2.7
- package installation for Windows 7
- FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)