[Bioc-devel] Custom CRAN repository in biocLite.R not working

Dan Tenenbaum dtenenba at fhcrc.org
Thu Mar 14 01:47:41 CET 2013


On Wed, Mar 13, 2013 at 1:37 PM, Cristobal Fresno Rodríguez
<cristobalfresno at gmail.com> wrote:
> Dear Dan
>
> The solution you suggested did the trick. In addition I also tried
>
> options("repos" = c(CRAN="http://mycranmirror"))
>
> which successfully did the trick in changing biocinstallRepos() output. I
> would suggest to modify biocLite comment from
>
> ## options("repos" = "http://cran.fhcrc.org")
>
> to
>
> ## options("repos" = c(CRAN="http://cran.fhcrc.org"))
>

Done.
Thanks,
Dan


> Thanks for the assistance.
>
>
>
> Kachelo
>
>
>
>
>
>
>
>
>
>
>
>
>
> 2013/3/13 Dan Tenenbaum <dtenenba at fhcrc.org>
>>
>>
>>
>> On Wednesday, March 13, 2013, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
>> >
>> >
>> > On Wednesday, March 13, 2013, Cristobal Fresno Rodríguez
>> > <cristobalfresno at gmail.com> wrote:
>> >> Greetings!!
>> >>
>> >> I am trying to use a local CRAN and Bioconductor repository for
>> >> academic purposes. In this context, in biocLite.R  script at
>> >> bioconductor.org suggests to use:
>> >>
>> >> options("repos" = "http://localCRANsite")
>> >>
>> >> options("BioC_mirror" = "http://localBioconductorSite")
>> >>
>> >> source("http://bioconductor.org/biocLite.R")
>> >>
>> >> biocLite("package name").
>> >>
>> >> After applying this modifications, only packages dependencies from
>> >> Bioconductor will user the local http://localBioconductorSite
>> >> repository. But, CRAN dependencies will override new "repos" value and
>> >> use http://cran.fhcrc.org instead. However, any
>> >> install.packages("package whatever") uses the new local repository
>> >> link.
>> >>
>> >> I believe the problem lies in biocinstallRepos() function as it
>> >> returns a name character where CRAN value is "http://cran.fhcrc.org"
>> >> instead of the new link. Digging a little more, this function calls
>> >> .biocinstallRepos which has hard-coded inside "http://cran.fhcrc.org".
>> >>
>> >> Can someone has a workaround?
>> >>
>> >
>> > Try:
>> > repos <- get option("repos")
>> Er, this should be:
>> repos <- getOption("CRAN")
>>
>>
>> > repos["CRAN"] <- "http://mycranmirror"
>> > options(repos=repos)
>> >
>> > Then check the value of
>> > biocinstallRepos()
>> >
>> > Dan
>> >>
>> >> Best regards
>> >>
>> >> Kachelo
>> >>
>> >>         [[alternative HTML version deleted]]
>> >>
>> >> _______________________________________________
>> >> Bioc-devel at r-project.org mailing list
>> >> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>> >>
>
>



More information about the Bioc-devel mailing list