Using :load in knitr

12 views
Skip to first unread message

Mark Bower

unread,
May 23, 2017, 11:11:06 PM5/23/17
to knitr
In an RMarkdown document, I have followed the tutorials and examples to get a Scala engine running, but that engine does not appear to recognize the Scala ":load" command:

```{r something-in-Scala, engine='scala', comment='Scala>', eval=TRUE, echo=TRUE, engine.opts='-savecompiled'}
val something = System.getenv("SOMETHING")
val somethingelse = something + " + Scala"
println("'" + something + "' is now '" + somethingelse + "'")
:load /Users/me/myClass.scala
```
The first lines work, but the last line crashes, giving the error:

    Invalid literal number :load

Thoughts on how to load this Scala.class?
Reply all
Reply to author
Forward
0 new messages