RProvider 2.0.0-beta

This is a prerelease version of RProvider.
There is a newer version of this package available.
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
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RProvider" Version="2.0.0-beta" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RProvider --version 2.0.0-beta
#r "nuget: RProvider, 2.0.0-beta"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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
Github Actions

NuGet

Package Stable Prerelease
RProvider NuGet Badge NuGet Badge

Developing

Make sure the following requirements are installed on your system:

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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,060 8/10/2022
2.0.3 579 12/1/2021
2.0.2 1,111 11/3/2021
2.0.1 496 11/2/2021
2.0.1-beta3 232 10/28/2021
2.0.1-beta2 268 10/22/2021
2.0.1-beta 316 10/19/2021
2.0.0-beta 227 9/27/2021
1.1.22 8,147 3/18/2019
1.1.21 1,380 9/17/2018
1.1.20 58,340 4/19/2016
1.1.19-alpha 843 4/16/2016
1.1.18-alpha 882 4/5/2016
1.1.17 2,699 4/5/2016
1.1.16-alpha 893 2/7/2016
1.1.15 12,256 11/14/2015
1.1.14 5,012 9/5/2015
1.1.13 5,345 7/14/2015
1.1.12 9,040 6/11/2015
1.1.11 1,338 6/11/2015
1.1.10 1,080 6/10/2015
1.1.9 1,180 6/10/2015
1.1.8 14,503 1/19/2015
1.1.7-alpha 925 1/19/2015
1.1.6 1,136 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,679 9/11/2014
1.0.16 1,424 9/9/2014
1.0.15 1,925 7/22/2014
1.0.13 8,107 6/23/2014
1.0.12 1,295 6/8/2014
1.0.11 1,177 6/8/2014
1.0.10 1,231 5/30/2014
1.0.9 2,636 5/21/2014
1.0.7-alpha 2,546 4/20/2014
1.0.6-alpha 1,133 4/20/2014
1.0.5 9,167 11/14/2013
1.0.4 1,740 11/8/2013
1.0.3 2,352 9/30/2013
1.0.2 1,255 9/25/2013
1.0.1 1,440 9/13/2013
1.0.1-beta 1,186 9/13/2013
1.0.0 1,367 5/8/2013

.NET 5 support with R 4.x compatability.