From btyner at stat.purdue.edu  Wed Nov 22 02:32:49 2006
From: btyner at stat.purdue.edu (Benjamin Tyner)
Date: Tue, 21 Nov 2006 20:32:49 -0500
Subject: [Rd] array indexes in C
Message-ID: <4563A8C1.7000606@stat.purdue.edu>

Hin-Tak & Tamas,

For example, see what I've done in 
http://www.stat.purdue.edu/~btyner/postage_0.1-1.tar.gz

I am by no means a C guru but it works with my compiler. The relevant 
lines are

(in postage.c:)
void postage(int *lambda, int *D, int *tau, int r[*tau][*D])
{

(in postage.R:)
      r <- .C("postage",
              as.integer(lambda),
              as.integer(D),
              as.integer(tau0),
              r = integer(tau0 * D),
              PACKAGE="postage")$r



[Rd] array indexes in C
Benjamin Tyner