rdotnet: R.NET not working at all with R-3.5.0 pre-release
Hi, I found a strange issue. In my R dot Net application I am not able create R session when using R-3.5.0 pre-release version. It always worked with older versions of R (older than R-3.5.0). RStudio works with R-3.5.0 but not R dot Net. I am using R.NET 1.7.0. Older version R.NET 1.6.5 also failed for me.
I have attached a sample C#.NET project
Line number 26 in Program.cs throws exception. Here is line 26
REngine engine = REngine.GetInstance();
You can download R pre-release from following link: https://cran.r-project.org/bin/windows/base/rdevel.html
Please help.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 82 (31 by maintainers)
Commits related to this issue
- Fixes 32-bit errors in earlier #70 commit Addresses errors reported in getting ALTREP support to work in 32-bit processes. Original fix was only working for 64-bit process because of the use of long... — committed to StatTag/rdotnet by lrasmus 5 years ago
- Additional edits related to #70 - other ulong to IntPtr Changes in other interfaces to R library to use IntPtr instead of ulong. This addresses issues with 32-bit problems reported in issue #70. — committed to StatTag/rdotnet by lrasmus 5 years ago
- Material to elicit further console output behavior as in https://github.com/jmp75/rdotnet/issues/70#issuecomment-491350152 — committed to rdotnet/rdotnet-support by jmp75 5 years ago
@jmp75 anything we can do to help finalize merging the R 3.5+ code into the master branch (sorry, know you’re busy)
I don’t think it has been fixed. I tried with a new installation of R 3.5 a few weeks ago and had the same problems, so reverted back to R 3.4.4
On Mon, Jan 28, 2019 at 10:25 PM -0500, “Luke R.” notifications@github.com wrote:
@Biopticon, @gusicadnan - what is your preferred way to access R.NET releases (code vs. NuGet)? I’ll be folding that branch into our master branch at a different repository. I don’t want to drive people there away from what @jmp75 has been maintaining, but unfortunately I don’t have rights on this repo or in NuGet to release. Am hoping @jmp75 may have a chance to chime in on incorporating the changes for R 3.5 here, or what the best path forward is to help maintain this project.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Does anyone have any idea of when this will be fixed in the Nuget version? (for all those involved, your efforts are massively appreciated!)
Hi, I tested version 1.8.2 and it works as expected. Thank you so much everyone for putting so much effort to make it work. Cheers
R.NET 1.8.1 is up on nuget, after a month of pre-release and some limited but positive feedback.
Short release notes is: Migration to .NET Standard 2.0, support for R 3.5.x, and moving to an MIT license. The license includes copyright attribution to the contributors.
There is a pre-release R.NET nuget package for user testing. Related and since @UnclAlDeveloper mentioned it rClr appears to be working really rather well on R 3.5, currently on a testing branch.
Unit tests are still a watchpoint at this stage (not always repeatable behavior), though perhaps not indicative of major problems for “real” use, hence the prerelease.
Shortly, thank you to people in this thread; will follow up with proper due credits for contributions.
@lrasmus - Good news! I can confirm that this issue now looks to be resolved in 32-bit. I ran this version on one of my more complex tools (lots of data being passed back and forth, simulations etc) with no problems.
The only remaining thing that I can see at the moment is the output / ICharacterDevice issue.
I think this is getting close 😃
EDIT: @lrasmus - You can ignore the previous email notification as I deleted my message. That was an error on my part.
I was able to get a build using the main repositories, but note when I did it it’s tied to .NET 4.5.1, not Core. Hopefully this will help @dannyparsons and @mortalrahu
NOTE: In the RDotNet and RDotNet.NativeLibrary projects, you may need to re-add the DynamicInterop reference, and may need to change .NET versions for the projects so they match.
@lrasmus I have used the test “RDotNet.S4ClassesTest.TestSlots” to tease out using the new Get_region methods. Seems to work out for integer and numeric vectors. Pushed to https://github.com/jmp75/rdotnet/tree/merge/StatTag . The new form of Vector.ToArray is a proposal. Feel free to suggest another.
Made some progress. I have a work in progress commit where I believe I’ve aligned the structs to the R 3.5 changes.
The challenge I’m working on now is with vector coercion. Per the release notes:
I need to learn about the ALTREP framework now to understand how that works and how to get results out of my coerced vectors.
@jmp75 @the-tourist- @adpgithub - being optimistic that I’ll sort that out, what is the preferred way to integrate this back into R.NET? The project I’m using this in would ideally have a single R.NET included that figures out the right structs to use depending on the version of R running. Is this a breaking enough change that 2 versions of R.NET ( R<3.5, R>=3.5) is more manageable? Haven’t thought this through yet, so suggestions are welcome.
Oh no! Okay, I will admit that I was hoping this would kinda “fix itself” between pre-release and the official release, so I put it on the back burner. Let me revisit now and see if I can identify what’s going on, or at least some type of fix/workaround. Thanks @the-tourist- for reporting it’s still an issue!