Skip to content

Solving the invalid source for Bioconductor packages

I’m switching computer again, and as usual this is the moment I chose to upgrade the pieces of software which are the most painful to upgrade, ie, in my case, most notably C++ libraries such as Boost, the C++ compiler (GCC 4.6, hurray! :)) and R (R-project) because of the need to reinstall all the extra packages (provided that the packages got updated in the first place!).

I never kept track of where I got my package from (CRAN vs Bioconductor) – in the future I’ll be more careful. Anyway, I encountered a weird issue when getting the Bioconductor packages:
Error in file(file, "r", encoding = encoding) :
cannot open the connection
In addition: Warning message:
In file(file, "r", encoding = encoding) :
InternetOpenUrl failed: 'The URL is invalid'

Indeed I thought that URL looked fishy. I’m not sure I remember whether or not it used to work (I don’t see how it possibly could, though), but at least at the moment it doesn’t.

A quick search for “source(“http:///biocLite.R”) not wokring” briefly got me the solution: the proper URL is, not http://biocLite.R.
So, whichever Bioconductor package you’re installing, the magic lines are:
biocLite("[package name here]")

Posted in R (R-project).

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA