Re: [R] C module causing rounding errors?

2010-07-09 Thread Joseph N. Paulson
Sorry for not including enough information everyone. I have quite a bit of code, so I will just enter relevant pieces... This is how I call C from R: The tstats are tstatistics (difference of mean, divided by sqrt of S1+S2) from an unpermuted matrix. The c code is below... dyn.load("testp.so")

Re: [R] C module causing rounding errors?

2010-07-09 Thread Duncan Murdoch
Joseph N. Paulson wrote: Hi all! I am currently writing a C-module for a for loop in which I permute columns in a matrix (bootstrapping) and I send a couple of variables into C initially. All of it is working, except the initial values I send to R are rounded/truncated (I believe rounded). I am

Re: [R] C module causing rounding errors?

2010-07-08 Thread Jeff Newmiller
Insufficient data. Please read the posting guide, particularly the part about reproducible code. It might have something to do with "double" vs "float". "Joseph N. Paulson" wrote: >Hi all! > >I am currently writing a C-module for a for loop in which I permute columns >in a matrix (bootstrappin

[R] C module causing rounding errors?

2010-07-08 Thread Joseph N. Paulson
Hi all! I am currently writing a C-module for a for loop in which I permute columns in a matrix (bootstrapping) and I send a couple of variables into C initially. All of it is working, except the initial values I send to R are rounded/truncated (I believe rounded). I am using a 32 bit machine to