genomicsclass / labs

Rmd source files for the HarvardX series PH525x
http://genomicsclass.github.io/book
MIT License
2k stars 1.94k forks source link

Error in knitr of all RMD files #98

Closed eringiles closed 3 years ago

eringiles commented 3 years ago

I'm trying to use the RMD files associated with the Statistics & R course, and I keep getting an error on the first chunk of code:

opts_chunk$set(fig.path=paste0("figure/", sub("(.*).Rmd","\\1",basename(knitr:::knit_concord$get('infile'))), "-"))

Error says: Error in basename(knitr:::knit_concord$get("infile")) : a character vector argument expected

Any suggestions?

rafalab commented 3 years ago

If you use knitr

knitr::knit("filename.Rmd")

It should work. If sourcing into R you can comment out that line.

sherifrisas commented 2 years ago

Delete the text in the URL that occurs after this pattern.