On Monday, 27 January 2020 at 14:16:47 UTC, Mike Parker wrote:
You've seen Lance Bachmeier posting in the forums under the
bachmeier handle. He's put together a post for the D Blog
showing how to integrate R into a D program.
The Blog:
https://dlang.org/blog/2020/01/27/d-for-data-science-calling-r-from-d/
Reddit:
https://www.reddit.com/r/programming/comments/euobu1/d_for_data_science_calling_r_from_d/
It's also on Hacker News. If it isn't on the front page, just
search for "D for Data Science". Please don't post a direct
link if you find it on there, not until after it's been on
there a few days.
https://news.ycombinator.com/
Great piece. Glad to see it.
One point that is confusing is below:
"There are two ways to execute R code from a D program. evalR
executes a string in R and prints the output to the screen, while
evalRQ does the same thing but suppresses the output. evalRQ also
accepts an array of strings that are executed sequentially."
So evalR normally prints the output to the screen, but evalRQ
does not unless you specify it with a print statement. However,
in Example 4 later have an array of strings with a print
statement at the end but it says that it won't print from it. So
does Example 4 print or not? Maybe distinguish between suppress
in D and print with R a little more clearly?
In addition, the embedr documentation could probably be more
clear on the difference between evalR and evalRQ using some of
this text.