Revision 2ad963b97009de7f1bf46c5da8604388c2c67d05 authored by Matthias Templ on 27 February 2013, 09:44:32 UTC, committed by cran-robot on 27 February 2013, 09:44:32 UTC
1 parent 823295f
Raw File
aDist.R
`aDist` <-
  function(x, y){
      if(is.vector(x)) x <- matrix(x, ncol=length(x))
	  if(is.vector(y)) y <- matrix(y, ncol=length(y))	  
	  
	  matOrig <- as.numeric(t(x))
	  matImp <- as.numeric(t(y))
	  n <- dim(x)[1]
	  p <- dim(x)[2]
	  dims <- as.integer(c(n, p))
	  rowDists <-  as.numeric(rep(0.0, n))
	  distance <- as.numeric(0.0)
	  out <- .C("da", 
				  matOrig,
				  matImp,
				  dims,
				  rowDists,
				  distance,
				  PACKAGE="robCompositions", NUOK=TRUE
		  )[[5]]
	  return(out)
}	  
	  
	
back to top