GithubHelp home page GithubHelp logo

kushan2018 / rdotnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rdotnet/rdotnet

0.0 1.0 0.0 3.67 MB

.NET interop library to call the R statistical language in the same process

License: MIT License

C# 93.53% F# 5.20% Shell 0.50% R 0.03% Batchfile 0.66% Dockerfile 0.08%

rdotnet's Introduction

R.NET

windows master: Build status master windows testing: Build status testing Linux master: Linux master Build Status Nuget Version

R.NET is an in-process bridge for the .NET Framework to access the R statistical language. R.NET works on Windows, Linux and MacOS.

License

MIT

Software requirements

On Windows, R.NET requires .NET Framework > 4.6.1 or .NET Core 2.0, and an access to the native R libraries installed with the R environment. R needs not necessarily be installed as a software on the executing machine, so long as DLL files are accessible (you may need to tweak environment variables for the latter to work, though) On Linux and MacOS, Mono is required, as well as an access to the native R libraries.

Getting started

As of 2017-08

  • If you want the latest binary distribution of R.NET and you are already familiar with managing dependencies with NuGet, head to R.NET on NuGet
  • If you need a bit more documentation to get started, the prefered entry point is at http://rdotnet.github.io/rdotnet

Building from source

Compiler toolchain foreword

Due to the move to targetting netstandard2.0, you might encounter compiling issue if using an older toolchain. This is machine dependent (mostly, which visual studio versions and .NET targetting packs you have). You may want to adapt the instructions from the rClr packge to avoid some pitfalls.

As an example:

  • where msbuild returns C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe should be the first line. C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe is probably not a good option.
  • msbuild -version returns 16.0.461.62831 or more recent
  • where dotnet: C:\Program Files\dotnet\dotnet.exe
  • dotnet --version: 2.1.602 or more. Note that this version of the .net core SDK would prevent compilation from VS2017: VS2019 required.
  • nuget help: 4.9.4.5839

Compiling

If using dotnet version prior to 2.1.3, installing/restoring prerelease dependency packages is problematic. You may need to use

nuget install -Prerelease DynamicInterop -OutputDirectory packages

otherwise:

nuget restore RDotNet.Tests.sln
dotnet build --configuration Debug --no-restore RDotNet.Tests.sln
# or if any issue possibly try:
# msbuild RDotNet.Tests.sln /p:Platform="Any CPU" /p:Configuration=Debug /consoleloggerparameters:ErrorsOnly

Unit tests

Unit tests can be run using:

dotnet test RDotNet.Tests/RDotNet.Tests.csproj

Normally you should get something like:

Total tests: 92. Passed: 84. Failed: 0. Skipped: 8.
Test Run Successful.
Test execution time: 5.2537 Seconds

However note that from time to time (or at the first dotnet test execution) tests may fail to start, for reasons as yet unknown:

Starting test execution, please wait...
The active test run was aborted. Reason:
Test Run Aborted.

It may be that all subsequent calls then work as expected.

dotnet test RDotNet.FSharp.Tests/RDotNet.FSharp.Tests.fsproj

Building the nuget package

This section is primarily a reminder to the package author.

set B_CONFIG=Release
:: Or for initial testing/debugging substitute Debug for Release
:: set B_CONFIG=Debug

dotnet build --configuration %B_CONFIG% --no-restore RDotNet.Tests.sln
dotnet pack R.NET/RDotNet.csproj --configuration %B_CONFIG% --no-build --no-restore --output nupkgs
dotnet pack RDotNet.FSharp/RDotNet.FSharp.fsproj --configuration %B_CONFIG% --no-build --no-restore --output nupkgs

rdotnet's People

Contributors

davidpendraykalibrate avatar dcharbon avatar evolvedmicrobe avatar guillaumejamet avatar hyh avatar jmp75 avatar kierenj avatar kos59125 avatar lrasmus avatar skyguy94 avatar tpetricek avatar wei-lu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.