Commit a10712fd authored by Antoine Lucas's avatar Antoine Lucas
Browse files

patch for burt function

parent 7b439bb3
Package: amap
Version: 0.8-2
Date: 2007-10-03
Version: 0.8-3
Date: 2009-05-18
Suggests: Biobase
Title: Another Multidimensional Analysis Package
Author: Antoine Lucas
......
......@@ -16,7 +16,7 @@ matlogic <- function(x)
k <- sum(nblev)
res <- as.integer(matrix(0,ncol=k,nrow=n))
x <- c(x,recursive=TRUE)
result <- .C("matind",
as.integer(nblev),
as.integer(x),
......
PKG_CPPFLAGS=@PKG_CPPFLAGS@ -Wno-conversion
PKG_CPPFLAGS=@PKG_CPPFLAGS@
PKG_LIBS=@PKG_LIBS@
......@@ -8,6 +8,9 @@
* \param res: return matrix, indicatrics of size nxsum(nblev)
* \param n,m size of matrix data.
*
*
*/
void matind(int * nblev,int * data,int * res, int * n, int * m,int * k)
......@@ -20,8 +23,11 @@ void matind(int * nblev,int * data,int * res, int * n, int * m,int * k)
/* for all individuals ... */
for(i = 0; i< *n; i++)
{
/* res[i,(curr_col_in_res+ data[i,j] -1)] ++;*/
res[i + (*n)*(curr_col_in_res+ data[i+ (*n)*j] -1)] ++;
if((i + (*n)*(curr_col_in_res+ data[i+ (*n)*j] -1)) >= 0)
{
/* res[i,(curr_col_in_res+ data[i,j] -1)] ++;*/
res[i + (*n)*(curr_col_in_res+ data[i+ (*n)*j] -1)] ++;
}
}
curr_col_in_res = curr_col_in_res + nblev[j];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment