Error in getClass(Class)
1
0
Entering edit mode
minhhoi • 0
@minhhoi-20669
Last seen 3.9 years ago

Hello, I start learning to use Bioconductor and I have a problem with showClass() function. When I'm knitting I get this error in the R Markdown window of RStudio, even though the line works perfectly fine in the Console window.

> showClass("BSgenome")

Error in getClass(Class) : "BSgenome" is not a defined class Calls: <Anonymous> ... withVisible -> eval -> eval -> showClass -> getClass

> sessionInfo()

R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.1       digest_0.6.18    dbplyr_1.4.0    
 [4] crayon_1.3.4     dplyr_0.8.0.1    assertthat_0.2.1
 [7] R6_2.4.0         DBI_1.0.0        magrittr_1.5    
[10] evaluate_0.13    pillar_1.3.1     rlang_0.3.4     
[13] rstudioapi_0.10  rmarkdown_1.12   tools_3.6.0     
[16] glue_1.3.1       purrr_0.3.2      yaml_2.2.0      
[19] xfun_0.6         compiler_3.6.0   pkgconfig_2.0.2 
[22] htmltools_0.3.6  knitr_1.22       tidyselect_0.2.5
[25] tibble_2.1.1     
annotation software error • 794 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States

Your sessionInfo indicates that you haven't loaded the BSgenome package yet. And if you ask for the class of an undefined class, you should get an error like what you see:

> showClass("BSgenome")
Error in getClass(Class) : "BSgenome" is not a defined class

If I do

---
title: the title
author: James W. MacDonald
output:
   BiocStyle::html_document:
       toc_float: true


---

# In the beginning

There was a classs...

 ```{r}

suppressPackageStartupMessages(library(BSgenome))
showClass("BSgenome")


 ```

and it was good.

And then I render it, I get

This here HTML document

ADD COMMENT
0
Entering edit mode

Which only took like five tries for me to get right...

ADD REPLY
0
Entering edit mode

Thank you for big help ^^.

ADD REPLY
0
Entering edit mode

Thank you for big help ^^.

ADD REPLY

Login before adding your answer.

Traffic: 975 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6