jvbraun / AlgDesign

Algorithmic Experimental Design by Robert E. Wheeler
12 stars 5 forks source link

Potential C source changes leading to errors? #17

Open jvbraun opened 2 years ago

jvbraun commented 2 years ago

From Nikos Cheimarios (November 9, 2021):

We are working with the AlgDesign package but we are facing an issue.

We noticed that the optFederov(...) function from R calls the FederovOpt(...) function from C (line 134 in the source code of FederovOpt.R) which is distributed as a library with R.

We created a small example with the latest release of R by using the optFederov(...) which calls directly the C binary distributed with R (please check TestR.R) and

we compiled the C code and use it as standalone (please check TestC.c).

The issue that we are facing is that the C library called from R and the standalone C compiled code from github do not yield the same results.

Running the codes we attach for the C library from R we get:

D 573.7296 A 0.359477 G 0.359477

for the standalone C code we get:

D 7550.3 A 0.0001651352 G 0.3143153

Along with the source code we attach the data (data.csv) used to acquire the aforementioned results.

Please note that in order to run the code you have to change the path for the data (line 3 in TestR.R and line 2244 in the TestC.c code).

Is there any chance that the source code in github be older compared to the one that the latest release of R uses?