Dear R Users---
I spent some time implementing the AS75 WLS regression algorithm in C
in order to learn the R interface to C. I did not find an easy, brief
C+R example of an algorithm that used persistent storage across calls.
they probably exist, but I could not find a nice brief template for
m
Thanks for all replies.
I will post the question on R-develop also since eventually I would like to
compile
more substantial C and C++ code into shared libraries.
Michael
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing lis
Michael,
Your function 'test' doesn't utilize any C++ features. Is there another
reason you are using a C++ compiler (g++)? If not, why not just use a C
compiler? You can then get rid of the 'extern C{}' wrapper, the
'__cdecl' declaration, and the MAKEFLAGS variable. Also, you may know
that the '
Hello,
This is not the appropriate mailing list. Use R-devel for questions
about C, etc ...
One thing that might help you is the inline package.
require( inline )
fx <- cfunction( signature( s = "numeric" ), '
SEXP result;
PROTECT(result = NEW_NUMERIC(1));
double* ptr=NUMERIC_POINTER(
Greetings,
I am trying to call simple C-code from R.
I am on Windows XP with RTools installed.
The C-function is
#include
#include
#include
#include
// prevent name mangling
extern "C" {
SEXP __cdecl test(SEXP s){
SEXP result;
PROTECT(result = NEW_NUMERIC(1));
double* ptr=NUMERIC_PO
5 matches
Mail list logo