简体   繁体   English

未找到电话:<Anonymous> 从 r studio 编织到 HTML 时出错

[英]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.

相关问题 R-Markdown编成html时出现错误怎么解决? - How to address the error when knitting R-Markdown to html? “编织”到html时使用R Markdown生成图 - Producing plots with R Markdown when “knitting” to html 编织到 ZFC35FDC70D5FC69D269883A822CAE7A 时如何保持默认 R markdown colors? - How to keep default R markdown colors when knitting to html? R Markdown 不使用 R Studio 编织到 Word - R Markdown not knitting to Word using R Studio 编织rmarkdown到html时,标签不会呈现 - Tabs not rendering when knitting rmarkdown to html 如何在将RMarkdown编织为HTML时设置主题? - How to set a theme when knitting RMarkdown to HTML? 编织到 HTML 文档并在服务器上运行时出现“不允许加载本地资源”错误 - "Not allowed to load local resource" error when knitting to HTML document and running on a server 编织/渲染 R Markdown 输出:我可以阻止代码在 PDF 输出中显示但允许在 HTML 输出中折叠代码吗? - Knitting/Rendering R Markdown Output: Can I prevent code from showing in PDF output but allow code folding in HTML output? 将 RMarkdown 编织到 HTML 时出错(HTML 中没有显示图表) - Errors when knitting RMarkdown to HTML (no graphs showing up in the HTML) 如何在rmarkdown中编织html时为双方证明文本的合理性 - How to justify the text to both sides when knitting html in rmarkdown
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM