Giter Club home page Giter Club logo

_to-do-fsharprprovider-fslaborg's Introduction

F# R Provider Build Status

BlueMountain Capital logo

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:

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.

How to use it

Install using the NuGet package. Many thanks to Mathias Brandewinder for producing the FAKE script to build the NuGet package, and to Steffen Forkmann for writing FAKE.

There is a lot of info on how to use the provider on our documentation page

License

FSharpRProvider is covered by the BSD license.

The library uses RDotNet which is also covered by the BSD license.

Pre-requisites

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 need to install 64 bit version of Mono, setup Xamarin Studio to run F# Interactive in 64 bit and create a configuration file ~/.rprovider.conf to tell the R provider how to start its server process in 64 bit mode. 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.

_to-do-fsharprprovider-fslaborg's People

Contributors

tpetricek avatar dcharbon avatar hmansell avatar jmp75 avatar mathias-brandewinder avatar sergey-tihon avatar geandbe avatar forki avatar jpalmer avatar cdrnet avatar renkun-ken avatar evolvedmicrobe avatar phdp avatar reedcopsey avatar jiridanek avatar kos59125 avatar

Watchers

 avatar  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.