Skip to content
Back to formatted view

Raw Message

Message-ID: <1120682521.42cc4219af503@www.courrier.umontreal.ca>
Date: 2005-07-06T20:42:01Z
From: Marie-Hélène Ouellette
Subject: R_alloc problems in R v1.11

Dear Dr. Ripley,

I'm using the R v1.11 on Macintoch and I seem to have a problem with the
function R_alloc. It crashes when using the following .C function (only an
example):

///////////////////////////////
# include <R.h>
void Hello(int *n)
{
int i,x;
for(i=1;1< *n ; i++)
{
	Rprintf('salut!!!\n');
}
x = (int *) R_alloc(5,sizeof(int));
}

///////////////////////////////

I call it in R with this line:

.C('Hello',as.integer(5))

Any idea why and how I can resolve this problem?

Thank you for your time,
Marie-H?l?ne