[ANN] RProjectConnector V1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] RProjectConnector V1.0

Blondeau Vincent

Hello everyone,

 

I am glad to announce the first version of the RProjectConnector, a binding between Pharo and R using NativeBoost.

 

You can now call directly your R methods from Pharo:

data := (1 to: 1000) collect: #yourself.

res := (#acf asRFunctionWith: {data}) eval

 

To use it, you should copy the R libraries near the Pharo VM (see the documentation on SmalltalkHub to see how to proceed) and

Gofer it 
    smalltalkhubUser: 'VincentBlondeau' project: 'RProjectConnector';
    configuration;
    loadStable

Don’t forget to relaunch Pharo after the installation to be able to use the connector.

 

The sources are available on Smalltalkhub:

http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector

 

if you want to participate, just ask me!

 

Cheers,

 

Vincent BLONDEAU




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

hernanmd
Vincent,
First of all, thank you for publishing such useful package. This is a very valuable contribution and I would be glad to contribute to the RProjectConnector project. There is one thing which bothers me: Having to manually copy the R library files (.dll or .so) is time-consuming and prevents unattended installation.

In BioSmalltalk I am currently downloading library files supporting several URI locations by using Metacello. This is just adding a line in the #baseline: method

spec preLoadDoIt: #preLoad.

The problem could be incompatibility of versions between the R installed in the user's machine and the .dll/.so versions provided by the RProjectConnector. A better option is to detect the R installation path and copying the libraries to the pharo-vm/ directory. What do you think?

Cheers,

Hernán


2014-12-08 11:10 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hello everyone,

 

I am glad to announce the first version of the RProjectConnector, a binding between Pharo and R using NativeBoost.

 

You can now call directly your R methods from Pharo:

data := (1 to: 1000) collect: #yourself.

res := (#acf asRFunctionWith: {data}) eval

 

To use it, you should copy the R libraries near the Pharo VM (see the documentation on SmalltalkHub to see how to proceed) and

Gofer it 
    smalltalkhubUser: 'VincentBlondeau' project: 'RProjectConnector';
    configuration;
    loadStable

Don’t forget to relaunch Pharo after the installation to be able to use the connector.

 

The sources are available on Smalltalkhub:

http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector

 

if you want to participate, just ask me!

 

Cheers,

 

Vincent BLONDEAU




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

Blondeau Vincent

Hernan,

 

I agree that it is a problem.

 

To detect the R installation path is complicated.

Under Windows, you should be able to extract a key in the registry to know where the program is installed. Under linux, as there is x64 and x32 R versions, and Pharo supports only x32 (but x64 soon), if you have a R x64 you should reinstall your whole Linux system to have the right libraries (I tried without success…).

 

I think that to set the libraries available to download on a server is currently a better idea. Do you know where it can be hosted?

 

Cheers,

 

Vincent

 

 

De : Pharo-users [mailto:[hidden email]] De la part de Hernán Morales Durand
Envoyé : mardi 16 décembre 2014 20:05
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] [ANN] RProjectConnector V1.0

 

Vincent,

First of all, thank you for publishing such useful package. This is a very valuable contribution and I would be glad to contribute to the RProjectConnector project. There is one thing which bothers me: Having to manually copy the R library files (.dll or .so) is time-consuming and prevents unattended installation.

 

In BioSmalltalk I am currently downloading library files supporting several URI locations by using Metacello. This is just adding a line in the #baseline: method

spec preLoadDoIt: #preLoad.

 

The problem could be incompatibility of versions between the R installed in the user's machine and the .dll/.so versions provided by the RProjectConnector. A better option is to detect the R installation path and copying the libraries to the pharo-vm/ directory. What do you think?

 

Cheers,

Hernán

 

 

2014-12-08 11:10 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hello everyone,

 

I am glad to announce the first version of the RProjectConnector, a binding between Pharo and R using NativeBoost.

 

You can now call directly your R methods from Pharo:

data := (1 to: 1000) collect: #yourself.

res := (#acf asRFunctionWith: {data}) eval

 

To use it, you should copy the R libraries near the Pharo VM (see the documentation on SmalltalkHub to see how to proceed) and

Gofer it 
    smalltalkhubUser: 'VincentBlondeau' project: 'RProjectConnector';
    configuration;
    loadStable

Don’t forget to relaunch Pharo after the installation to be able to use the connector.

 

The sources are available on Smalltalkhub:

http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector

 

if you want to participate, just ask me!

 

Cheers,

 

Vincent BLONDEAU

 



Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

hernanmd
Hi Vincent,

2014-12-17 6:02 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hernan,

 

I agree that it is a problem.

 

To detect the R installation path is complicated.


Yes, I am currently working in a NBWin32Registry so we can do:

(NBWin32Registry hKeyLocalMachine at: 'Software\R-core\R') values

the reason I didn't committed a solution is I am having ERROR_INVALID_FUNCTION with RegEnumValueA

apiRegEnumValue: hKey with: dwIndex with: lpValueName with: lpcchValueName with: lpReserved with: lpType with: lpData with: lpcbData
    " http://msdn.microsoft.com/en-us/library/windows/desktop/ms724865%28v=vs.85%29.aspx "

    <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode>
    ^ self nbCall: #(
        long RegEnumValueA(
            HKEY hKey,
            DWORD dwIndex,
            LPTSTR lpValueName,
            LPDWORD lpcchValueName,
            LPDWORD lpReserved,
            LPDWORD lpType,
            LPBYTE lpData,
            LPDWORD lpcbData)) module: 'advapi32.dll'
 

Under Windows, you should be able to extract a key in the registry to know where the program is installed. Under linux, as there is x64 and x32 R versions, and Pharo supports only x32 (but x64 soon), if you have a R x64 you should reinstall your whole Linux system to have the right libraries (I tried without success…).

 


Thanks for the advice
 

I think that to set the libraries available to download on a server is currently a better idea. Do you know where it can be hosted?

 


An option to upload library files could be http://files.pharo.org/ but I don't have access to.

Foy my configurations I am currently using DropBox although not charming it serves well.
But AFAIK you cannot link multiple accounts to one DropBox.

There are other reliable options?

Hernán



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

Blondeau Vincent

 

 

De : Pharo-users [mailto:[hidden email]] De la part de Hernán Morales Durand
Envoyé : jeudi 18 décembre 2014 05:31
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] [ANN] RProjectConnector V1.0

 

Hi Vincent,

Hi,

 

2014-12-17 6:02 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hernan,

 To detect the R installation path is complicated.

 

Yes, I am currently working in a NBWin32Registry so we can do:

(NBWin32Registry hKeyLocalMachine at: 'Software\R-core\R') values

 

the reason I didn't committed a solution is I am having ERROR_INVALID_FUNCTION with RegEnumValueA

apiRegEnumValue: hKey with: dwIndex with: lpValueName with: lpcchValueName with: lpReserved with: lpType with: lpData with: lpcbData
    " http://msdn.microsoft.com/en-us/library/windows/desktop/ms724865%28v=vs.85%29.aspx "

    <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode>
    ^ self nbCall: #(
        long RegEnumValueA(
            HKEY hKey,
            DWORD dwIndex,
            LPTSTR lpValueName,
            LPDWORD lpcchValueName,
            LPDWORD lpReserved,
            LPDWORD lpType,
            LPBYTE lpData,
            LPDWORD lpcbData)) module: 'advapi32.dll'

 

Where is the Windows registry access project?

 

  

I think that to set the libraries available to download on a server is currently a better idea. Do you know where it can be hosted?

 


An option to upload library files could be http://files.pharo.org/ but I don't have access to.

Foy my configurations I am currently using DropBox although not charming it serves well.
But AFAIK you cannot link multiple accounts to one DropBox.

There are other reliable options?

http://files.pharo.org/ seems to be a good solution.

Vincent

 

Hernán

 

 




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

hernanmd


2014-12-19 7:52 GMT-03:00 Blondeau Vincent <[hidden email]>:

 

 

De : Pharo-users [mailto:[hidden email]] De la part de Hernán Morales Durand
Envoyé : jeudi 18 décembre 2014 05:31
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] [ANN] RProjectConnector V1.0

 

Hi Vincent,

Hi,

 

2014-12-17 6:02 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hernan,

 To detect the R installation path is complicated.

 

Yes, I am currently working in a NBWin32Registry so we can do:

(NBWin32Registry hKeyLocalMachine at: 'Software\R-core\R') values

 

the reason I didn't committed a solution is I am having ERROR_INVALID_FUNCTION with RegEnumValueA

apiRegEnumValue: hKey with: dwIndex with: lpValueName with: lpcchValueName with: lpReserved with: lpType with: lpData with: lpcbData
    " http://msdn.microsoft.com/en-us/library/windows/desktop/ms724865%28v=vs.85%29.aspx "

    <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode>
    ^ self nbCall: #(
        long RegEnumValueA(
            HKEY hKey,
            DWORD dwIndex,
            LPTSTR lpValueName,
            LPDWORD lpcchValueName,
            LPDWORD lpReserved,
            LPDWORD lpType,
            LPBYTE lpData,
            LPDWORD lpcbData)) module: 'advapi32.dll'

 

Where is the Windows registry access project?

 


I have just uploaded to

http://smalltalkhub.com/#!/~OS/OS-Windows

Package is OS-Windows-Registry, and main class renamed to WinRegistry.
 

  

I think that to set the libraries available to download on a server is currently a better idea. Do you know where it can be hosted?

 


An option to upload library files could be http://files.pharo.org/ but I don't have access to.

Foy my configurations I am currently using DropBox although not charming it serves well.
But AFAIK you cannot link multiple accounts to one DropBox.

There are other reliable options?

http://files.pharo.org/ seems to be a good solution.

Vincent

 

Hernán

 

 




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

Juan Pablo Sandoval
In reply to this post by Blondeau Vincent
Hi,

I was trying to use RProjectConnector in my Mac (1.9.1) and i have some issues :(.

I have copied the dynamic libraries of R to /usr/lib directory (.i.e. libR.dylib). But PharoVM does not find the libraries. For instance, this line of code returns always nil.

          self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: #R 
          "copied from the project"

I also tried copying the libraries to folder Pharo.app/Contents/MacOS/Plugins. or passing the library name as parameter like:
         
          self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: 'libR.dylib'
or

          self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: '/usr/lib/libR.dylib'

But i had not success. Could someone help me? I am doing something wrong?

Thanks,
Juampi






2014-12-08 11:10 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hello everyone,

 

I am glad to announce the first version of the RProjectConnector, a binding between Pharo and R using NativeBoost.

 

You can now call directly your R methods from Pharo:

data := (1 to: 1000) collect: #yourself.

res := (#acf asRFunctionWith: {data}) eval

 

To use it, you should copy the R libraries near the Pharo VM (see the documentation on SmalltalkHub to see how to proceed) and

Gofer it 
    smalltalkhubUser: 'VincentBlondeau' project: 'RProjectConnector';
    configuration;
    loadStable

Don’t forget to relaunch Pharo after the installation to be able to use the connector.

 

The sources are available on Smalltalkhub:

http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector

 

if you want to participate, just ask me!

 

Cheers,

 

Vincent BLONDEAU




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.



--
Saludos,
Juan Pablo
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

hernanmd
In reply to this post by Blondeau Vincent
Hi again,

This is how to copy the R Windows dll's to the Pharo VM directory, detecting the installation path using the registry (requires latest OSWindows package). Tested under Windows 8.1

| rPath dlls |
(rPath := WinRegistry
    queryValue: 'InstallPath'
    fromKey: (WinRegistryKey localMachine queryOpenSubkey: 'Software\\R-core\\R')) notNil
        ifTrue: [
            dlls := (rPath asFileReference / 'bin' / 'i386') entries
                    select: [ : entry | entry  extension = 'dll' ]
                    thenDo: [ : dllEntry | 
                        dllEntry asFileReference
                            copyTo: Smalltalk vmDirectory asFileReference / dllEntry basename ] ].

Would you integrate it into ConfigurationOfRProjectConnector?
Cheers,

Hernán

2014-12-19 7:52 GMT-03:00 Blondeau Vincent <[hidden email]>:

 

 

De : Pharo-users [mailto:[hidden email]] De la part de Hernán Morales Durand
Envoyé : jeudi 18 décembre 2014 05:31
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] [ANN] RProjectConnector V1.0

 

Hi Vincent,

Hi,

 

2014-12-17 6:02 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hernan,

 To detect the R installation path is complicated.

 

Yes, I am currently working in a NBWin32Registry so we can do:

(NBWin32Registry hKeyLocalMachine at: 'Software\R-core\R') values

 

the reason I didn't committed a solution is I am having ERROR_INVALID_FUNCTION with RegEnumValueA

apiRegEnumValue: hKey with: dwIndex with: lpValueName with: lpcchValueName with: lpReserved with: lpType with: lpData with: lpcbData
    " http://msdn.microsoft.com/en-us/library/windows/desktop/ms724865%28v=vs.85%29.aspx "

    <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode>
    ^ self nbCall: #(
        long RegEnumValueA(
            HKEY hKey,
            DWORD dwIndex,
            LPTSTR lpValueName,
            LPDWORD lpcchValueName,
            LPDWORD lpReserved,
            LPDWORD lpType,
            LPBYTE lpData,
            LPDWORD lpcbData)) module: 'advapi32.dll'

 

Where is the Windows registry access project?

 

  

I think that to set the libraries available to download on a server is currently a better idea. Do you know where it can be hosted?

 


An option to upload library files could be http://files.pharo.org/ but I don't have access to.

Foy my configurations I am currently using DropBox although not charming it serves well.
But AFAIK you cannot link multiple accounts to one DropBox.

There are other reliable options?

http://files.pharo.org/ seems to be a good solution.

Vincent

 

Hernán

 

 




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] RProjectConnector V1.0

Blondeau Vincent
In reply to this post by Juan Pablo Sandoval

Hi Juampi,

 

I know that the libraries are difficult to configure. We will improve that.

I don’t have a Mac, but as far as I know, you need to put the R libraries where are the Pharo ones like “libAsynchFilePlugin.dylib”.

 

If you didn’t do it, you need to restart the Pharo image at each time you change the library location and you need to install R (to copy the libraries seems not enough).

 

If it works, inspect “self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: #R” should show you a NBExternalAddress instead of nil.

 

Furthermore, you need to use the 32 bits R libraries, Pharo doesn’t not support yet the 64 bit libs.

 

I hope that will be helpful,

 

Regards,

 

Vincent

 

De : Pharo-users [mailto:[hidden email]] De la part de Juan Pablo Sandoval Alcocer
Envoyé : vendredi 13 mars 2015 23:20
À : Any question about pharo is welcome
Cc : Pharo Development List
Objet : Re: [Pharo-users] [ANN] RProjectConnector V1.0

 

Hi,

 

I was trying to use RProjectConnector in my Mac (1.9.1) and i have some issues :(.

 

I have copied the dynamic libraries of R to /usr/lib directory (.i.e. libR.dylib). But PharoVM does not find the libraries. For instance, this line of code returns always nil.

 

          self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: #R 

          "copied from the project"

 

I also tried copying the libraries to folder Pharo.app/Contents/MacOS/Plugins. or passing the library name as parameter like:

         

          self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: 'libR.dylib'

or

 

          self nbGetSymbolAddress: 'Rf_initEmbeddedR' module: '/usr/lib/libR.dylib'

 

But i had not success. Could someone help me? I am doing something wrong?

 

Thanks,

Juampi

 

 

 

 

 

 

2014-12-08 11:10 GMT-03:00 Blondeau Vincent <[hidden email]>:

Hello everyone,

 

I am glad to announce the first version of the RProjectConnector, a binding between Pharo and R using NativeBoost.

 

You can now call directly your R methods from Pharo:

data := (1 to: 1000) collect: #yourself.

res := (#acf asRFunctionWith: {data}) eval

 

To use it, you should copy the R libraries near the Pharo VM (see the documentation on SmalltalkHub to see how to proceed) and

Gofer it 
    smalltalkhubUser: 'VincentBlondeau' project: 'RProjectConnector';
    configuration;
    loadStable

Don’t forget to relaunch Pharo after the installation to be able to use the connector.

 

The sources are available on Smalltalkhub:

http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector

 

if you want to participate, just ask me!

 

Cheers,

 

Vincent BLONDEAU

 



Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.



 

--

Saludos,

Juan Pablo




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.