Reputation: 45
{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.
Error in hist(tanh(corfit$atanh.correlations)) : object 'corfit' not found Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> plot -> hist Execution halted
Any suggestions?
Thanks!
Upvotes: 1
Views: 16524
Reputation: 21
You need to remove your code: "eval=F"
eval = FALSE prevents code from being evaluated. (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
Upvotes: 0
Reputation: 141
I think that it might be because your statement eval=F. This in fact makes knitr not to evaluate corfit and then the object can't be found. Try to delete eval=F and see what happens!
Upvotes: 0