From 4fed76cce5e3347a8f82457603d77bf38a02b619 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sat, 18 Mar 2017 02:42:32 +0100
Subject: [PATCH] prepare wrappers EMGLLF.R --> EMGLLF.c

---
 pkg/R/EMGLLF.R               | 19 ++++++++++++++++++-
 pkg/R/EMGrank.R              | 17 ++++++++++++++++-
 pkg/src/adapters/a.EMGLLF.c  |  1 +
 pkg/src/adapters/a.EMGrank.c |  1 +
 4 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/pkg/R/EMGLLF.R b/pkg/R/EMGLLF.R
index e600032..2b1a0af 100644
--- a/pkg/R/EMGLLF.R
+++ b/pkg/R/EMGLLF.R
@@ -1 +1,18 @@
-#TODO: wrapper on C function
+#' EMGLLF
+#'
+#' Description de EMGLLF
+#'
+#' @param phiInit ...
+#'
+#' @return ...
+#'
+#' @examples
+#' ...
+#' ...
+#' @export
+EMGLLF <- function(phiInit, rhoInit, piInit, gamInit,
+	mini, maxi, gamma, lambda, X, Y, tau)
+{
+	.Call("EMGLLF", phiInit, rhoInit, piInit, gamInit,
+		mini, maxi, gamma, lambda, X, Y, tau, PACKAGE="valse")
+}
diff --git a/pkg/R/EMGrank.R b/pkg/R/EMGrank.R
index eaa3246..71f7c5b 100644
--- a/pkg/R/EMGrank.R
+++ b/pkg/R/EMGrank.R
@@ -1 +1,16 @@
-#TODO: wrapper sur fonction C (on a besoin de C pour ça ?!)
+#' EMGrank
+#'
+#' Description de EMGrank
+#'
+#' @param Pi ...
+#'
+#' @return ...
+#'
+#' @examples
+#' ...
+#' ...
+#' @export
+EMGrank <- function(Pi, Rho, mini, maxi, X, Y, tau, rank)
+{
+	.Call("EMGrank", Pi, Rho, mini, maxi, X, Y, tau, rank, PACKAGE="valse")
+}
diff --git a/pkg/src/adapters/a.EMGLLF.c b/pkg/src/adapters/a.EMGLLF.c
index 0df00bd..4ef4396 100644
--- a/pkg/src/adapters/a.EMGLLF.c
+++ b/pkg/src/adapters/a.EMGLLF.c
@@ -2,6 +2,7 @@
 #include <Rdefines.h>
 #include "EMGLLF.h"
 
+// See comments in src/sources/EMGLLF.c and R/EMGLLF.R (wrapper)
 SEXP EMGLLF(
 	SEXP phiInit_,
 	SEXP rhoInit_,
diff --git a/pkg/src/adapters/a.EMGrank.c b/pkg/src/adapters/a.EMGrank.c
index 469349c..b1dad9b 100644
--- a/pkg/src/adapters/a.EMGrank.c
+++ b/pkg/src/adapters/a.EMGrank.c
@@ -2,6 +2,7 @@
 #include <Rdefines.h>
 #include "EMGrank.h"
 
+// See comments in src/sources/EMGrank.c and R/EMGrank.R (wrapper)
 SEXP EMGrank(
 	SEXP Pi_,
 	SEXP Rho_,
-- 
2.44.0