knitr doesn't know new function (r-markdown)

流过昼夜 提交于 2019-12-02 13:47:46

问题


I have a problem regarding the HTML-output with knitr (r-markdown).

I worked with the function gamlss from the package "gamlss", but knitr cannot find this function/package. So when I try to make an output with "Knit HTML", it just appears an error message:

"(error in eval(expr, envir, enclos) : couldnt find Function "gamlss" Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval implementation stopped. "

Has anybody ever dealt with a similar problem?


回答1:


you have to load the package in the markdown file as well

```{r,echo=FALSE}
library(gamlss)
**rest of the code**
```


来源:https://stackoverflow.com/questions/25260108/knitr-doesnt-know-new-function-r-markdown

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!