274
Views
11
Comments
Integrate R with C#
Question

Hi all,

new "problem" of the year ...

What if I need to integrate R with C# ? Did someone of you have experience in that ?

At the moment I integrated the R.NET libraries in my C# project and it work great.

I made a XIF with the first action but my test page is in "loading" and I don't have no results and no errors ...

2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Luca De Mori,

Assuming that you have installed all the libraries, did you setup the engine to access R features?

Regards,

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Luca,

You should be able to use any .NET assembly DLL in your C# project. However, since R is not native .NET, are you using R.NET or something similar?

2019-11-26 09-13-57
Luca De Mori

thanks for your answers ...


yes, in my project I have the RDotNet libraries v. 1.7.0.0 and, yes, the DLL are included in my XIF

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

You could try to use some GenericExtendedActions.LogMessage statements in your C# code to see up to what point the Extension works as expected.

2019-11-26 09-13-57
Luca De Mori

Hi Kilian ... sorry but I don't know absolutely what you're talking about ...


do you have some links / material about that ?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

The closest there is to documentation I know of is this.

2018-10-04 11-09-42
Tiago Oliveira

Hello,

What Kilian was suggesting was using the code:

"GenericExtendedActions.LogMessage(AppInfo.GetAppInfo().OsContext, "<Message>", "<ModuleName>");"

to "debug" your C# code.

You can replace <Message> with the piece of data (variables or whatever) that you want to check and <ModuleName> with the name of the module (eSpace) that you are testing. This line of code will result on a output that you can read on Service Center on the "General" tab.

By using this you can check how far your extension went running properly and you can check the information on the variables.

2019-11-26 09-13-57
Luca De Mori

thank you Kilian and Tiago ...


do you use it ? Because the first "warning" I have is Visual Studio is that "GenericExtendedActions.Audit" is depracated ... it tells me to use "LogMessage" instead ...

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Erm... both me and Tiago said to use "LogMessage"???

2019-11-26 09-13-57
Luca De Mori

Kilian Hekhuis wrote:

Erm... both me and Tiago said to use "LogMessage"???

Sorry ... I was using "GenericExtendedActions.Audit" !

2018-10-04 11-09-42
Tiago Oliveira

Yes. I have used it to do debugging and check some values on my C# variables.

That warning is correct. You should now use "GenericExtendedActions.LogMessage" like Kilian and I showed you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.