forked from yziquel/OCaml-R
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
open OCamlR | ||
open OCamlR_wraputils | ||
open OCamlR_base | ||
|
||
module Stubs = OCamlR_utils_stubs | ||
|
||
let data ?envir name = | ||
R.eval (R.symbol "data") [ | ||
R.arg R.string name ; | ||
R.opt Environment.r "envir" envir ; | ||
] | ||
|> ignore | ||
|
||
let write'table ?file ?sep ?col'names ?row'names ?quote x = | ||
Stubs.write'table | ||
?file:(file |?> R.string) | ||
?sep:(sep |?> R.string) | ||
?col'names:(col'names |?> R.bool) | ||
?row'names:(row'names |?> R.bool) | ||
?quote:(quote |?> R.bool) | ||
~x:(Dataframe.r x) () | ||
|> ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
open OCamlR_base | ||
|
||
val data : | ||
?envir:Environment.t -> | ||
string -> unit | ||
|
||
val write'table : | ||
?file:string -> | ||
?sep:string -> | ||
?col'names:bool -> | ||
?row'names:bool -> | ||
?quote:bool -> | ||
Dataframe.t -> | ||
unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(library | ||
(name OCamlR_utils) | ||
(public_name ocaml-r.utils) | ||
(wrapped false) | ||
(libraries ocaml-r.base ocaml-r.wraputils)) | ||
|
||
(rule | ||
(targets OCamlR_utils_stubs.ml) | ||
(deps (:exe ../../stubgen/stubgen.exe)) | ||
(action (with-stdout-to %{targets} (run %{exe} utils)))) |