[英]not found Calls: <Anonymous> error when knitting from r studio to HTML
{r,eval=F}
corfit <- duplicateCorrelation(brain.rma, design.trt, block = blocks)
{r histOfcorrelations}
print(cor)
{r}
plot(hist(tanh(corfit$atanh.correlations)))
My codes run just fine in the RMD file, but will not knit to HTML.我的代码在 RMD 文件中运行得很好,但不会编织到 HTML。
Error in hist(tanh(corfit$atanh.correlations)) : object 'corfit' not found Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> plot -> hist Execution halted hist(tanh(corfit$atanh.correlations)) 中的错误:找不到对象“corfit”调用:... withCallingHandlers -> withVisible -> eval -> eval -> plot -> hist 执行停止
Any suggestions?有什么建议么?
Thanks!谢谢!
I think that it might be because your statement eval=F.我认为这可能是因为您的声明 eval=F。 This in fact makes knitr not to evaluate corfit and then the object can't be found.这实际上使 knitr 不评估 corfit 然后找不到对象。 Try to delete eval=F and see what happens!尝试删除 eval=F 看看会发生什么!
You need to remove your code: "eval=F"您需要删除您的代码:“eval=F”
eval = FALSE prevents code from being evaluated. eval = FALSE 防止代码被评估。 (And obviously if the code is not run, no results will be generated). (显然,如果代码没有运行,将不会产生任何结果)。 This is useful for displaying example code, or for disabling a large block of code without commenting each line.这对于显示示例代码或禁用大块代码而不注释每一行很有用。 https://yihui.org/knitr/options/#code-evaluation https://yihui.org/knitr/options/#code-evaluation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.