R Knit Markdown code chunk: “object not found”

独自空忆成欢 提交于 2019-12-11 18:22:27

问题


New to markdown and knit, so...
In RStudio, this markdown code does well

## 'r': razão entre opções
```{r}
round(apply(rst0[,c('rstQ','rstV','rstMkt','rstMkt2','rstAntiMkt')],2,mean),3)
```
  rstQ       rstV     rstMkt    rstMkt2 rstAntiMkt 
81.408    111.098      0.012      0.007      0.005 

But when I click knit button, I get error:

Line 20 Error in apply(rst0[,c('rstQ','rstV','rstMkt','rstMkt2','rstAntiMkt')], : object 'rst0' not found Calls: <Anonimous> ... withCallingHandlers  -> withVisible -> eval -> eval  -> apply

But knit('../gap.Rmd') successfully generates the gap.md file.

来源:https://stackoverflow.com/questions/56243555/r-knit-markdown-code-chunk-object-not-found

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