How to embedR

Hello, wondering if someone can help,

I am trying to embedR so I can call the changepoint package from q, but can’t seem to get R embedded properly.  I am looking through the github page

https://github.com/KxSystems/embedR

I’m just trying to test quickly with w32

| Windows | Open the archive and copy content of the embedr folder (embedr\*) to %QHOME% or c:\q
Copy R_HOME/x64/.dll or R_HOME/i386/.dll to QHOME/w64 or QHOME/w32 respectively. |

I’ve set on windows env var

R_HOME=C:\R\R_3.6.1



I've copied all dlls from R_HOME/bin/_i386_/.dll to QHOME/w32



but when I try to load rinit.q I'm getting error



<font color='"#1d1c1d"' face='"Arial,' helvetica sans-serif><span style='"font-variant-ligatures:' contextual white-space: pre-wrap><div class='"prettyprint"' style='"background-color:' rgb border-color: border-style: solid border-width: overflow-wrap: break-word><code class='"prettyprint"'><div class='"subprettyprint"'>
<span style='"color:' class='"styled-by-prettify"'> ERROR</span><span style='"color:' class='"styled-by-prettify"'>:</span><span style='"color:' class='"styled-by-prettify"'> </span><span style='"color:' class='"styled-by-prettify"'>'The specified module could not be found. </span>
</div></code></div>
<br></span></font><font size='"2"'><font color='"#1d1c1d"'><span style='"font-variant-ligatures:' contextual white-space: pre-wrap>have also tried setting env vars </span></font><code style='"box-sizing:' inherit color: rgb font-feature-settings: font-family: courier new monospace background-color: rgba direction: ltr margin-right: margin-left: padding-top: padding-bottom: border-radius: box-shadow: word-break: break-word clone>R_SHARE_DIR</code><span style='"color:' rgba font-family: roboto neue helvetica arial sans-serif>, </span><code style='"box-sizing:' inherit color: rgb font-feature-settings: font-family: courier new monospace background-color: rgba direction: ltr margin-right: margin-left: padding-top: padding-bottom: border-radius: box-shadow: word-break: break-word clone>R_INCLUDE_DIR</code><span style='"color:' rgba font-family: roboto neue helvetica arial sans-serif>, </span><code style='"box-sizing:' inherit color: rgb font-feature-settings: font-family: courier new monospace background-color: rgba direction: ltr margin-right: margin-left: padding-top: padding-bottom: border-radius: box-shadow: word-break: break-word clone>LD_LIBRARY_PATH</code></font>



but I can't seem to get it to work



Any ideas?



Thanks!

I see now that version 1.0.0 is the only version to work on w64 is that correct? 

Hi Roni,

Thanks for the message. I just had a look at following the instructions from the github and was able to install and run the 32 bit install on Windows with release 1.0.0 without any issues. I’ll need to check the 64 bit release on Monday but I believe an install is possible using the instructions provided at least with the 32 bit version. 

If you ensure that the embedr.dll which is in the w32 folder in that release is in your %QHOME%\w32 folder, the ‘specified module error’ you’re seeing is often seen when the required dll is not in the correct location. I’ll look at improving the instructions and the repository in general in the coming weeks. If you have any more questions please let me know here or email fusion@kx.com

All the best,

Conor

Got it thanks Conor, yea I got it to work with 1.0.0 guess was trying newer version on win and it didnt work.

Thanks