[BioC] removing packages from the workspace - is this ok?
Hervé Pagès
hpages at fhcrc.org
Wed Jun 8 21:55:20 CEST 2011
Hi Jose, Steve, Tim,
It seems to me that the more general question Jose is asking is how
to unambiguously refer to an object when several objects with the same
name are defined in several packages.
One solution is to use the "fully qualified name" of the object i.e.
to use a <pkgname>:: prefix. For example:
BSgenome.Hsapiens.UCSC.hg18::Hsapiens
BSgenome.Hsapiens.UCSC.hg19::Hsapiens
For convenience, this can be combined with Steve's suggested
reassignment to shorter names:
hg18 <- BSgenome.Hsapiens.UCSC.hg18::Hsapiens
hg19 <- BSgenome.Hsapiens.UCSC.hg19::Hsapiens
By using the "fully qualified name", the result of this reassignment
doesn't depend on the order the packages were loaded anymore.
Cheers,
H.
On 11-06-07 02:06 PM, Tim Triche, Jr. wrote:
> you're right, it's more of a general solution. I end up with multiple
> versions of annotation packages, multiple namespaces' worth of S4 generics,
> etc. floating around and it is a nice swiss army chainsaw (like many of
> Hadley's packages) with some remaining rough edges. The ability to just
> "find a bigger hammer" appeals to me, but a purposeful solution is probably
> better for the problem at hand.
>
>
> On Tue, Jun 7, 2011 at 12:53 PM, Steve Lianoglou<
> mailinglist.honeypot at gmail.com> wrote:
>
>> Hi,
>>
>> On Tue, Jun 7, 2011 at 2:34 PM, Tim Triche, Jr.<tim.triche at gmail.com>
>> wrote:
>>> One solution to the issue of managing packages in your R
>>> namespace/environment is Hadley Wickham's devtools
>>> package<https://github.com/hadley/devtools#readme>.
>>> I am surprised more people don't use it for this
>>
>> I actually tried using that a while ago in order to help make package
>> development easier, but:
>>
>> (1) Isn't that more for being able to work with "source" packages w/o
>> having to install them; and
>> (2) as an aside, back then it had some problems with S4-isms (which
>> may have been fixed by now)
>>
>> As with most all of Hadley's work -- I think devtools is (will be)
>> great, but I don't quite see how that's the right tool for this job,
>> though ... ?
>>
>> -steve
>>
>> --
>> Steve Lianoglou
>> Graduate Student: Computational Systems Biology
>> | Memorial Sloan-Kettering Cancer Center
>> | Weill Medical College of Cornell University
>> Contact Info: http://cbio.mskcc.org/~lianos/contact
>>
>
>
>
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the Bioconductor
mailing list