IHaskell icon indicating copy to clipboard operation
IHaskell copied to clipboard

ihaskell-rlangqq usage example

Open birnam opened this issue 4 years ago • 0 comments

I've been toying with all of the ihaskell-display packages, and have been up to successfully render all of them (sort of) except ihaskell-rlangqq. I can't figure out how to get this to work, can I have a small usage example?

I've tried this:

:extension QuasiQuotes

import IHaskell.Display.Rlangqq

x = [0 .. 10  :: Double]

[rDisp|library(ggplot2)
    plot(qplot( hs_x, $(map (sin . (*pi) . (/10)) x) ))
    dev.off()|]

And only receive this error:

Warning message: In in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, : You changed the working directory to /opt/notebooks/haskell (probably via setwd()). It will be restored to /opt/notebooks/haskell/Rtmp/b94dbcfc. See the Note section in ?knitr::knit

If I insert something like svg(file="test.svg") the rendering works, it just doesn't show in my labs notebook.

I've heard that RLang-QQ is being deprecated, but I'd appreciate some guidance on this just so I can get something to show, thanks!

birnam avatar Jul 17 '20 04:07 birnam