Closed rosieli5 closed 5 years ago
Hi Rosie,
could you please let me know what versions of the BEDMatrix package and its dependency, the crochet package (which contains the convertIndex
function), you are using? You can copy and paste the following two lines into an R session:
packageVersion("BEDMatrix")
packageVersion("crochet")
Thanks, Alex
Hi Alex, here are the package versions below. Thank you!
Best, Rosie
> packageVersion("BEDMatrix",lib.loc=pkgpath)
[1] ‘1.4.1’
> packageVersion("crochet",lib.loc=pkgpath)
[1] ‘2.1.0’
Weird, crochet 2.1.0 should definitely contain the convertIndex
function--it's even exported. What happens if you load the crochet package before the BEDMatrix package and run your example again?
library("crochet", lib.loc = pkgpath)
library("BEDMatrix", lib.loc = pkgpath)
mat <- BEDMatrix("test.bed")
mat[1:2,1:2]
Aha, it worked. Thanks Alex!
Best, Rosie
You shouldn't have to load the crochet package manually, though... What version of R are you using? You can figure that out by copy and pasting version$version.string
into your R session.
True, not having to load it each time would be better. I have R version 3.5.1 (2018-07-02)
.
Sorry, I cannot reproduce the problem on my end. Can you reproduce the problem on your end if you run the following code in a new R session?
pkgpath <- "please_fill_in"
library("BEDMatrix", lib.loc = pkgpath)
mat <- BEDMatrix("test.bed")
mat[1:2,1:2]
I got the following message. Hmm it may be an issue with my environment?
Warning: namespace ‘crochet’ is not available and has been replaced
by .GlobalEnv when processing object ‘’
Error in convertIndex(x, i, "i", allowDoubles = allowDoubles) :
could not find function "convertIndex"
Sounds like there is a workspace image (a hidden file called .RData
) in the directory from which you start your R session. You can either delete or rename the file before starting R, start R with the --no-restore
option, run rm(list = ls())
after starting R, or start R from a different directory to get a clean environment.
I tried rm(list=ls())
, but it didn't seem to have worked. Thanks still!
Hi there,
When I typed
I received the following error message:
Any suggestions? Thanks!
Best, Rosie