JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

eval=FALSE ignored in Rmarkdown Julia chunks? #109

Closed nolta closed 5 years ago

nolta commented 5 years ago

I'm using RStudio + Rmarkdown + JuliaCall to create a beamer presentation. However, I can't seem to disable evaluating Julia chunks, i.e., eval=FALSE seems to be ignored.

Here's a test Rmd document:

---
title: "eval=FALSE ignored in Julia chunks?"
author: "Mike Nolta"
date: "28/06/2019"
output: beamer_presentation
---

```{r setup, include=FALSE}
library(knitr)
knitr::opts_chunk$set(
  engine.path = list(
    julia = '/Applications/Julia-1.1.app/Contents/Resources/julia/bin',
    python = '~/anaconda3/bin/python'
  )
)
```

## Slide 1

```{r, eval=FALSE}
2 + 3
```

```{python, eval=FALSE}
2 + 3
```

```{julia, eval=FALSE}
2 + 3
```

No output is generated for the R or Python chunks, but the Julia chunk always generates 5.

Session Info ```r > sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.5 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib locale: [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.6.0 htmltools_0.3.6 tools_3.6.0 yaml_2.2.0 Rcpp_1.0.1 rmarkdown_1.13 [7] knitr_1.23 xfun_0.7 digest_0.6.19 evaluate_0.14 ```
nolta commented 5 years ago

I edited my original comment, adding a python chunk.

Non-Contradiction commented 5 years ago

Thanks for the feedback!

It seems that I have made a silly mistake in julia engine, which should be fixed by commit 753c78c.

nolta commented 5 years ago

Thanks, it works!