From j.maspons at creaf.uab.cat  Mon Jun 11 20:10:45 2012
From: j.maspons at creaf.uab.cat (Joan Maspons)
Date: Mon, 11 Jun 2012 20:10:45 +0200
Subject: [Rd] Patch to add Beta binomial distribution. Mentor needed!
In-Reply-To: <4FCDCD03.7060904@stats.ox.ac.uk>
References: <CANF72pNnfRHOBr_4mvwsk1o1J52hz6LPLEQP6sMjkWOCYX5cOA@mail.gmail.com>
	<A1056BE4-973C-4883-864C-AC1DC800CF7F@gmail.com>
	<loom.20120605T102246-250@post.gmane.org>
	<4FCDCD03.7060904@stats.ox.ac.uk>
Message-ID: <CANF72pN_gU1_guWJOLQfWfKMi5TNEjK3bLmDOVUJyLENqA+-OQ@mail.gmail.com>

Hello,

I'm trying to implement the Beta binomial distribution as a R package.
I studied R-ext manual but still there are some problems. The code in
C seems to work except for the rbetabinom function which is not very
random (it always returns the same values for the same parameters). I
have tried to use GetRNGstate(); and PutRNGstate(); but it give a SEG
FAULT when I call GetRNGstate. You can try the code like this:

cd /path/to/src
cmake ./CMakeLists.txt
make
./r-package


I can build and install the package but when I call the functions from
R they always return NULL except for rbetabinom which remains hanged
indefinitely.

Any advise?

-- 
Joan Maspons
CREAF (Centre de Recerca Ecol?gica i Aplicacions Forestals)
Universitat Aut?noma de Barcelona, 08193 Bellaterra (Barcelona), Catalonia
Tel +34 93 581 2915 ? ? ? ? ? ?j.maspons at creaf.uab.cat
http://www.creaf.uab.cat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: betaBinomial_0.1.tar.gz
Type: application/x-gzip
Size: 8003 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20120611/c0a9d6ce/attachment.gz>


[Rd] Patch to add Beta binomial distribution. Mentor needed!
Joan Maspons