From jeff.horner at vanderbilt.edu  Wed Nov 22 21:38:23 2006
From: jeff.horner at vanderbilt.edu (Jeffrey Horner)
Date: Wed, 22 Nov 2006 14:38:23 -0600
Subject: [Rd] How can I call a function R from C
In-Reply-To: <50a711930611221210l21bf78d7q29030644006ddeb5@mail.gmail.com>
References: <50a711930611221210l21bf78d7q29030644006ddeb5@mail.gmail.com>
Message-ID: <4564B53F.4050603@vanderbilt.edu>

Ricardo Rios wrote:
> Hi wizards, I have a function in R for example:
> anyfunction<-function(beta0, popsize, maxgen),
> 
> but I have a  function in C  for example:
> 
> SEXP otherfunction(SEXP beta0, SEXP popsize, SEXP maxgen)
> 
> I call it function with .Call but I need to call to anyfunction on
> otherfunction. Does somebody know how to do it?

Scope out tests/Embedding/RNamedCall.c in the R sources. It's got what 
you want.


Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner



[Rd] How can I call a function R from C
Jeffrey Horner