Error in Knit R Markdown document (could not find function "Biocexptpkg")
3
0
Entering edit mode
Jon Bråte ▴ 260
@jon-brate-6263
Last seen 4 months ago
Norway

Hi,

I am trying to Knit my Rmarkdown file in R Studio, but get this message:

Quitting from lines 12-55 (MBV-INFX410-transcriptomics.Rmd)
Error in eval(expr, envir, enclos) :
  could not find function "Biocexptpkg"
Calls: <Anonymous> ... in_dir -> inline_exec -> withVisible -> eval -> eval
Execution halted

Line 12 only contains this ## Experimental

Thanks, Jon

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] magrittr_1.5    htmltools_0.3.5 tools_3.3.1     yaml_2.1.13     Rcpp_0.12.7     stringi_1.1.2   rmarkdown_1.0   knitr_1.14     
 [9] stringr_1.1.0   digest_0.6.10   evaluate_0.10 

 

rmarkdown rstudio knitr • 16k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States

You need to load the BiocStyle package if you want to call functions from that package, which includes using that set of styles for your rmarkdown file.

ADD COMMENT
1
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States

Hard to tell what's going on, not enough info here, but:

I'm pretty sure that Rmd errors usually give the range of the chunk that threw the error, so the code is in lines 12-55 (not just line 12)

Run the chunks of your Rmd file one by one until you get to the code block that is giving the error. Step through that line by line and debug from there.

If you are in RStudio, this process is made easy with its "run all chunks above" and other run functions available from the toolbar in the editor.

ADD COMMENT
0
Entering edit mode
Jon Bråte ▴ 260
@jon-brate-6263
Last seen 4 months ago
Norway

Thanks a lot! Problem solved! :)

ADD COMMENT

Login before adding your answer.

Traffic: 914 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