From marie-helene.ouellette at UMontreal.CA  Wed Jul  6 22:42:07 2005
From: marie-helene.ouellette at UMontreal.CA (=?iso-8859-1?b?TWFyaWUtSOls6G5l?= Ouellette)
Date: Wed,  6 Jul 2005 16:42:07 -0400
Subject: [Rd] R_alloc problems in R v1.11
Message-ID: <1120682527.42cc421f34fdc@www.courrier.umontreal.ca>

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



[Rd] R_alloc problems in R v1.11
=?iso-8859-1?b?TWFyaWUtSOls6G5l?= Ouellette