RProvider 2.0.0-beta
See the version list below for details.
dotnet add package RProvider --version 2.0.0-beta
NuGet\Install-Package RProvider -Version 2.0.0-beta
<PackageReference Include="RProvider" Version="2.0.0-beta" />
paket add RProvider --version 2.0.0-beta
#r "nuget: RProvider, 2.0.0-beta"
// Install RProvider as a Cake Addin
#addin nuget:?package=RProvider&version=2.0.0-beta&prerelease
// Install RProvider as a Cake Tool
#tool nuget:?package=RProvider&version=2.0.0-beta&prerelease
F# R Provider
<img align="right" src="https://github.com/fslaborg/RProvider/raw/master/docs/img/logo.png" alt="RProvider" />
An F# type provider for interoperating with R. For more information, see detailed documentation with tutorials, examples and more. The following tutorials are a good place to start:
The R Provider discovers R packages that are available in your R installation and makes them available as .NET namespaces underneath the parent namespace RProvider. For example, the stats package is available as RProvider.stats. If you open the namespaces you want to use, functions and values will be available as R.name.
Builds
GitHub Actions |
---|
NuGet
Package | Stable | Prerelease |
---|---|---|
RProvider |
Developing
Make sure the following requirements are installed on your system:
- dotnet SDK 5.0 or greater; and
- R statistical environment.
You must set the R_HOME environment variable to the R home directory, which can usually be identified by running the command 'R RHOME'.
NB. If you require .NET framework support, you should use RProvider 1.2 or earlier.
What does it do?
The R Provider discovers R packages that are available in your R installation and makes them available as .NET namespaces underneath the parent namespace RProvider. For example, the stats package is available as RProvider.stats. If you open the namespaces you want to use, functions and values will be available as R.name. For example, consider this F# interactive script:
#r "RProvider.dll"
open RProvider
open RProvider.``base``
let v = R.c(1,2,3)
This creates an R numeric vector containing 1,2,3, and names it v. Note that we had to open the base namespace, since the function 'c' is part of that namespace. You should also open namespace RProvider, because it contains some helper functions.
And because type providers are used by Visual Studio, Xamaring Studio and other IDEs, you will get intellisense for R functions. You will also get compile-time type-checking that the function exists.
Using the library
There is a lot of info on how to use the provider on our documentation page. You can install the library using the NuGet package.
The R Provider requires an installation of R, downloadable from here.
On Windows, RProvider uses the R registry key SOFTWARE\R-core
to locate the R binary directory, in order to load R.dll
. It will also locate R.dll
if it is on the path. If run from a 32-bit process, RProvider will use the 32-bit R.DLL, and if run from a 64-bit process, it will load the 64-bit version.
On Mac and Linux, you must set the R_HOME environment variable to the R home directory, which can usually be identified by running the command 'R RHOME'. For detailed documentation see the R provider Mac/Linux page.
If you are using R 2.15 or later, you should not try to load the RProvider inside a script that is passed to FSI via the --use flag. It seems that something about the way R initializes causes it to hang in that context. Works fine if you load later.
For compilation you will need VS2012 / F# 3.0 or later. For runtime you'll need .NET 4.5.
License
RProvider is covered by the BSD license.
The library uses RDotNet which is also covered by the BSD license.
Maintainers
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- FSharp.Core (>= 4.6.2)
- Newtonsoft.Json (>= 13.0.1)
- PipeMethodCalls (>= 3.0.4)
- R.NET (>= 1.9.0)
- R.NET.FSharp (>= 1.9.0)
- System.ComponentModel.Composition (>= 5.0.0)
- System.Configuration.ConfigurationManager (>= 5.0.0)
- System.Reflection.MetadataLoadContext (>= 5.0.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on RProvider:
Package | Downloads |
---|---|
Deedle.RPlugin
Deedle implements an efficient and robust frame and series data structures for manipulating with structured data. It supports handling of missing values, aggregations, grouping, joining, statistical functions and more. For frames and series with ordered indices (such as time series), automatic alignment is also available. This package installs core Deedle package, together with an R type provider plugin which makes it possible to pass data frames and time series between R and Deedle |
|
RPlotTools
Tools for plotting using R from F#. |
|
FsLab.Runner
This package contains a library for turning FsLab experiments written as script files into HTML and LaTeX reports. The easiest way to use the library is to use the 'FsLab Journal' Visual Studio template. |
|
Spreads.RPlugin
Spreads.RPlugin |
|
EFRM
Algorithms and solutions for the book Elements of Financial Risk Management by Peter F. Christoffersen written on F# and R |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.0 | 1,288 | 8/10/2022 |
2.0.3 | 580 | 12/1/2021 |
2.0.2 | 1,152 | 11/3/2021 |
2.0.1 | 496 | 11/2/2021 |
2.0.1-beta3 | 233 | 10/28/2021 |
2.0.1-beta2 | 283 | 10/22/2021 |
2.0.1-beta | 316 | 10/19/2021 |
2.0.0-beta | 228 | 9/27/2021 |
1.1.22 | 8,283 | 3/18/2019 |
1.1.21 | 1,385 | 9/17/2018 |
1.1.20 | 60,470 | 4/19/2016 |
1.1.19-alpha | 845 | 4/16/2016 |
1.1.18-alpha | 883 | 4/5/2016 |
1.1.17 | 2,793 | 4/5/2016 |
1.1.16-alpha | 894 | 2/7/2016 |
1.1.15 | 13,191 | 11/14/2015 |
1.1.14 | 5,277 | 9/5/2015 |
1.1.13 | 5,515 | 7/14/2015 |
1.1.12 | 9,757 | 6/11/2015 |
1.1.11 | 1,349 | 6/11/2015 |
1.1.10 | 1,083 | 6/10/2015 |
1.1.9 | 1,183 | 6/10/2015 |
1.1.8 | 15,850 | 1/19/2015 |
1.1.7-alpha | 925 | 1/19/2015 |
1.1.6 | 1,138 | 1/14/2015 |
1.1.5-alpha | 916 | 1/13/2015 |
1.1.4-alpha | 948 | 1/13/2015 |
1.1.3-alpha | 951 | 1/13/2015 |
1.1.2-alpha | 915 | 1/10/2015 |
1.1.1-alpha | 901 | 1/9/2015 |
1.1.0-alpha | 893 | 1/9/2015 |
1.0.17 | 4,932 | 9/11/2014 |
1.0.16 | 1,426 | 9/9/2014 |
1.0.15 | 1,929 | 7/22/2014 |
1.0.13 | 8,802 | 6/23/2014 |
1.0.12 | 1,300 | 6/8/2014 |
1.0.11 | 1,181 | 6/8/2014 |
1.0.10 | 1,236 | 5/30/2014 |
1.0.9 | 2,813 | 5/21/2014 |
1.0.7-alpha | 2,703 | 4/20/2014 |
1.0.6-alpha | 1,133 | 4/20/2014 |
1.0.5 | 10,423 | 11/14/2013 |
1.0.4 | 1,743 | 11/8/2013 |
1.0.3 | 2,396 | 9/30/2013 |
1.0.2 | 1,259 | 9/25/2013 |
1.0.1 | 1,444 | 9/13/2013 |
1.0.1-beta | 1,188 | 9/13/2013 |
1.0.0 | 1,371 | 5/8/2013 |
.NET 5 support with R 4.x compatability.