package ocaml-r
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8ecea70a631896b4328c465028b628a6bcbbb7dbad8571df69c0297ff9a088ca
sha512=ac77d473ba35f98f2ea4034db3be514720d4dadae2e12692d4a846ab6ee03db66a24b846a0f1cd1a2b9cd674dd89c45a82b7d78e884cb3b36f17afff64ffe72c
Description
OCaml-R is a library that can be used to construct R values in memory, convert them to OCaml values, and build clean wrappers to R functions. It provide a simple means to develop bindings to any R package.
README
OCaml-R: Objective Caml bindings for the R interpreter
OCaml-R is an Objective Caml binding embedding R's interpreter into OCaml code. It also provides bindings to R's standalone mathematical library, and has embryonic support for R's standard libraries.
It can be used to build R datastructures in memory, call R functions and convert the returned value to OCaml datastructures.
The API documentation is available online.
Installation
opam install ocaml-rLibrary usage
Under utop:
# #require "ocaml-r.base";;
# open OCamlR_base;;
# Numeric.(of_list [3. ; 1. ; 4. ; 1. ; 5. ; 9.] |> print);;
[1] 3 1 4 1 5 9
- : unit = ()To access functions from package foo, load ocaml-r.foo, e.g.:
# #require "ocaml-r.stats";;
# OCamlR_stats.rnorm 6 |> Numeric.print;;
[1] 0.17350351 -0.72756521 2.02369760 -0.77302094 -1.28523133 0.05172992
- : unit = ()There are other packages. ocaml-r.math links to the standalone mathematical shared library of R. Other packages, such as R.base and R.stats are embryonic bindings of R's standard library. Help is very welcome on this side.
Authorship
OCaml-R was initially written by Maxence Guesdon. It was a rather simple binding that was used essentially by feeding strings to the R interpreter parser and evaluation function, and providing data conversion functions for simple R types. This was version 0.1 of OCaml-R.
Version 0.2, is essentially an almost complete rewrite by Guillaume Yziquel providing tight integration with the R library. It can dissect R values to expose their internal structures to OCaml (though this shouldn't be the most useful aspect, nor the recommended way to use this binding), it construct R calls by building up R values directly, integrates OCaml's and R's garbage collectors (though somewhat poorly), chains R exceptions back to Objective Caml, and provides static initialisation of the R interpreter.
Starting 2012, Philippe Veber took over the maintainance.
Copyright 2008-2010 INRIA - Maxence Guesdon. Contact: maxence.guesdon@inria.fr
Copyright 2009-2010 Guillaume Yziquel. Contact: guillaume.yziquel@citycable.ch
Copyright 2011-2018 Philippe Veber. Contact: philippe.veber@gmail.com
Licenced under the GPL version 3.
Dependencies (6)
Dev Dependencies (1)
-
alcotest
with-test
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building ocaml-r with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.6.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure