R/setDist.R

"setDist" <-
function(d, x, k)
{
if(!is.list(x))
  x <- as.list(x)
if(!(class(d) == "dist"))  
 stop("`d' must be a of class `dist'")
if(any(unlist(x)>attr(x,"Size")))
 stop("indexes in `x' behond the size of `d'")
 n <- length(x)
 k <- rep(k,n)[1:n]
 return(invisible(.Call("setDist", d, x, as.numeric(k),  PACKAGE="rrp")))
}

Try the rrp package in your browser

Any scripts or data that you put into this service are public.

rrp documentation built on May 2, 2019, 5:25 p.m.