After merge
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 9 Jul 2018 19:04:33 +0000 (21:04 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 9 Jul 2018 19:04:33 +0000 (21:04 +0200)
pkg/src/registerDynamicSymbol.c [new file with mode: 0644]
pkg/tests/testthat/test-optimParams.R

diff --git a/pkg/src/registerDynamicSymbol.c b/pkg/src/registerDynamicSymbol.c
new file mode 100644 (file)
index 0000000..b371922
--- /dev/null
@@ -0,0 +1,10 @@
+// RegisteringDynamic Symbols
+
+#include <R.h>
+#include <Rinternals.h>
+#include <R_ext/Rdynload.h>
+
+void R_init_morpheus(DllInfo* info) {
+       R_registerRoutines(info, NULL, NULL, NULL, NULL);
+       R_useDynamicSymbols(info, TRUE);
+}
index 809056f..6864804 100644 (file)
@@ -50,7 +50,7 @@ naive_f = function(link, M1,M2,M3, p,β,b)
 test_that("naive computation provides the same result as vectorized computations",
 {
        h <- 1e-7 #for finite-difference tests
-       tol <- 5e-4 #.25 * sqrt(h) #about 7.9 e-5
+       tol <- 1e-3 #large tolerance, necessary in some cases... (generally 1e-6 is OK)
        for (dK in list( c(2,2), c(5,3)))
        {
                d = dK[1]