I am building a R package with the help of Hadley Wickham book. However I encounter an issue while knitting a vignette. I get this error (I rewrote the names of the vignette and function):
"Quitting from lines 208-212 (nameofthevignette.Rmd)
Error in foo(argument1, argument2, argument3 :
"foo" function can not be found
Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Execution halted"
It appears that I have a problem with the "foo" function and that it can not be found. However, it is exported and listed in the NAMESPACE file and the "foo" function works if I run it. The problem appears only when knitting entirely the vignette using it. If I run the vignette chunk by chunk it works. In this vignette I also call other functions from my package before calling the "foo" function and there is no problem with them. No error or warning either when I check or build my package (devtools::check()
, devtools::build()
).
Do you have any idea of what can cause such an issue and how to resolve it?
Thank you for your help!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…