Re: [Rd] Inconsistent results from .C()

2013-05-22 Thread Robin Evans
On 21 May 2013 14:10, Robin Evans wrote: > Sure! C code is below if it helps. The gist is that the function > oneMargin forms two matrices M and C, mostly by repeatedly taking > Kronecker products. > > Robin > > void kronecker (int *A, int *B, int *dima, int *dimb, in

Re: [Rd] Inconsistent results from .C()

2013-05-21 Thread Robin Evans
] += 1; iterate(index, lev2); } } free(lev2); free(Cj); free(Cj2); free(mult); } On 21 May 2013 14:04, R. Michael Weylandt wrote: > > It might also help if you can point us to the C code to help debug. > > MW > > On Tue, May 21, 2013 at 10:53 AM, Robin

[Rd] Inconsistent results from .C()

2013-05-21 Thread Robin Evans
c(1L,1L,1L,1L,1L), c(1L,1L,1L,1L,1L), 1L, > c(2L,2L,2L,2L,2L), 5L, ptr1, ptr2)[[7]]) [1] -1 -1 1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 1 -1 -1 1 1 1 1 -1 -1 > x = .C("oneMargin", c(1L,1L,1L,1L,1L), c(1L,1L,1L,1L,1L), 1L, > c(2L,2L,2L,2L,2L), 5L, ptr1

Re: [Rd] Inconsistent results from .C()

2013-05-21 Thread Robin Evans
I should add to this that I'm running on Scientific Linux 6. I later noticed that the bug only seems to occur when I run the code from Rstudio, and not if I use the terminal directly, so this may be the key to the problem. Robin On 20 May 2013 16:12, Robin Evans wrote: > Hello, >

[Rd] Location of Internal Code

2011-05-03 Thread Robin Evans
ike to see how it works. I've searched through the header files in R-2.x.x/include/ (Windows version), but to no avail. Thanks, Robin -- Robin Evans Statistics Department University of Washington www.stat.washington.edu/~rje42 __ R-devel@r-proj