[Bioc-devel] BUG: conversion of IRanges DataFrame to data.frame raises error IFF AnnotationDbi loaded
Steve Lianoglou
mailinglist.honeypot at gmail.com
Tue Oct 2 19:40:12 CEST 2012
Hi Malcolm,,,,,
On Tue, Oct 2, 2012 at 1:21 PM, Cook, Malcolm <MEC at stowers.org> wrote:
> H'lo,
>
> I get this error:
>
> Error in as.data.frame(DataFrame(a = 1)) :
> could not find function "injectIntoScope"
>
> when coercing a DataFrame to a data.frame, but only when preceeded by:
>
> library(AnnotationDbi)
>
> The following transcript demos in more detail.
>
> Is there a workaround for me pending a fix?
Strangely, it all actually works for me even after I load the
AnnotationDbi package.
I see that your mixing devel (AnnotationDbi) and release versions
(IRanges) of some packages, could this be the problem?
Perhaps you could try `IRanges::as.data.frame(DataFrame(a = 1))` might work?
-steve
>
> Thanks!
>
> Malcolm
>
>
>> library(IRanges)
> Loading required package: BiocGenerics
> Attaching package: 'BiocGenerics'
> ...
>> as.data.frame(DataFrame(a=1))
> a
> 1 1
>> showMethods("as.data.frame")
> Function: as.data.frame (package base)
> x="ANY"
> x="AtomicList"
> x="DataFrame"
> x="DataFrameList"
> x="GappedRanges"
> x="GroupedIRanges"
> x="Hits"
> x="OverlapEncodings"
> x="RangedData"
> x="Ranges"
> x="RangesList"
> x="Rle"
> x="Vector"
> x="numeric"
> (inherited from: x="ANY")
>
>> library(AnnotationDbi)
> ...
>> as.data.frame(DataFrame(a=1))
> Error in as.data.frame(DataFrame(a = 1)) :
> could not find function "injectIntoScope"
>> showMethods("as.data.frame")
> Function: as.data.frame (package base)
> x="ANY"
> x="AtomicList"
> x="Bimap"
> x="DataFrame"
> x="DataFrameList"
> x="GappedRanges"
> x="GroupedIRanges"
> x="Hits"
> x="OverlapEncodings"
> x="RangedData"
> x="Ranges"
> x="RangesList"
> x="Rle"
> x="Vector"
>
>> sessionInfo()
> R version 2.15.0 (2012-03-30)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] AnnotationDbi_1.19.31 Biobase_2.17.7 IRanges_1.14.4 BiocGenerics_0.3.1
>
> loaded via a namespace (and not attached):
> [1] DBI_0.2-5 RSQLite_0.11.2 compiler_2.15.0 stats4_2.15.0 tools_2.15.0
>>
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
--
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
More information about the Bioc-devel
mailing list