have), and I wonder if you have this backwards.
A .c file is C, a .C file is C++ (in R 2.11.1 but not R 2.12.0).
extern "C" would be required if this were a C++ source, but we were told
otherwise.
On Sat, 9 Oct 2010, Steve Pederson wrote:
Hi Prof Ripley,
Thanks for the response &a
I think I should also add that I have compiled R from source so am
pretty confident that I have the correct set of Rtools.
On 8/10/2010 8:06 PM, Prof Brian Ripley wrote:
On Fri, 8 Oct 2010, Steve Pederson wrote:
Hi,
I'm trying to write a function in C for implementation with .Call.
ings, but I stripped it back while I was trying to figure out what is
happening.
Thanks again,
Steve
On 8/10/2010 8:06 PM, Prof Brian Ripley wrote:
On Fri, 8 Oct 2010, Steve Pederson wrote:
Hi,
I'm trying to write a function in C for implementation with .Call.
When compiling using R CMD
Hi,
I'm trying to write a function in C for implementation with .Call. When
compiling using R CMD SHLIB characters seem to be added to the function
name.
Here's the complete C code from the file summariseMCMC.c:
#include
#include
#include
void summariseMCMC(SEXP data) {
PROTECT(data=AS
;day Steve,
On Tue, 20 Jul 2010 17:20:49 +0930
Steve Pederson wrote:
I suggest to insert the following two lines (untested as I usually
don't work on Windows):
# include
# include
void test1 (double *x, double *result)
{
GetRNGstate();
result[0] = rgamma(*x, 2.
Hi,
I've been trying to get this working for ages, but it causes R to hang.
Here is my C code saved as test1.c
# include
# include
void test1 (double *x, double *result)
{
result[0] = rgamma(*x, 2.0);
}
This was compiled using R CMD SHLIB test1.c & loaded in R using:
dyn.load("test1.dll
Thanks for the help. That sorted it out straight away.
Duncan Murdoch wrote:
On 14/07/2010 12:01 PM, Steve Pederson wrote:
Hi,
I can't seem to install R from source. I've downloaded the latest
Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ & done a
full instal
Hi,
I can't seem to install R from source. I've downloaded the latest
Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ & done a
full installation of that and Inno Setup.
I have set R_HOME as C:\R (and also tried using C:\R\R-2.11.1)
After successfully running 'tar xf R-2.11.1.tar
8 matches
Mail list logo