Displaying 1 result from an estimated 1 matches for "gibbs_sampl".
Did you mean:
gibbs_sampler
2012 Jan 05
1
Calling R functions within C/C++
...within C/C++)
I'm aware that you can call R random number generators as well as probability distribution functions with the GetRNGstate() but what about other functions?
The sample of the C code below reveals what I would like to do regarding the rep function.
extern "C" {
void Gibbs_Sampler (double *vect.PI, int *iteration)
{
int i;
for (int i=0; i<*iteration; i++)
{
...
PI.rep = rep(vec.PI,times=n) // Can we call the R rep function such that this line of code (or any equivalent code) is va...