简体   繁体   中英

R markdown - Not knitting despite the notebook running without Error

So I am trying to make a R markdown using a package loaded from source.

install.packages('/Users/~/Desktop/BPA/rBSEM_0.2.1.tar.gz', repos = NULL, type = 'source')

With a clear environment, the code runs successfully. However, when I try to knit the document, I run into several errors.

The first is that "object 'sample_SEM' not found". This stems from this line of code:

data(sample_SEM)

Where sample_SEM is data encoded into the rBSEM package.

The next problem is that it cannot find the function 'getInputGraph' - which is in the package.

inputAdj <- getInputGraph(blockList = blockL,blockGraph = G,varNames=names(sample_SEM))

Does anyone have any suggestions? Sorry I couldn't be more specific but I'm not quite sure what is happening here.

Thanks!

have you ran library(rBSEM) at the top of your first R chunk? You may have ran library(rBSEM) at the console, but if it's not in the first R chunk, it's not being loaded when knitting the document.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM