[Bioc-devel] BUG: conversion of IRanges DataFrame to data.frame raises error IFF AnnotationDbi loaded

Cook, Malcolm MEC at stowers.org
Tue Oct 2 19:21:58 CEST 2012


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?

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   
>



More information about the Bioc-devel mailing list