From ligges at statistik.uni-dortmund.de  Wed Jul  6 23:06:12 2005
From: ligges at statistik.uni-dortmund.de (Uwe Ligges)
Date: Wed, 06 Jul 2005 23:06:12 +0200
Subject: [Rd] R_alloc problems in R v1.11
In-Reply-To: <1120682524.42cc421c73faf@www.courrier.umontreal.ca>
References: <1120682524.42cc421c73faf@www.courrier.umontreal.ca>
Message-ID: <42CC47C4.1000409@statistik.uni-dortmund.de>

Marie-H?l?ne Ouellette wrote:

> Dear Dr. Ripley,

This is R-devel, among hundreds of other readers, Prof. Ripley is 
perhaps listening as well.

There is no reason to send dozens of messages. Please read the posting 
guide.


> I'm using the R v1.11 on Macintoch and I seem to have a problem with the

There is no version 1.11, and there never was. Current is 2.1.1 anything 
older than 2.x.y is unsupported these days.


> 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++)

Do you mean
   i < *n
???

> {
> 	Rprintf('salut!!!\n');

What about using double quotes?

> }
> x = (int *) R_alloc(5,sizeof(int));

What is this intended to do???

Uwe Ligges



> }
> 
> ///////////////////////////////
> 
> 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
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] R_alloc problems in R v1.11
Uwe Ligges