R/calcorder.R

Defines functions calcorder

calcorder <-
function(positions){
  
  #creates the dist object and then runs the MDS scale command
  distance.matrix<- dist(positions[,4:6], method ="euclidean", p  = 2)
  distance.vector <- cmdscale(distance.matrix, k = 1, eig = FALSE, add = FALSE, x.ret= FALSE)
  return(distance.vector)
}

Try the iPAC package in your browser

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

iPAC documentation built on Nov. 8, 2020, 7:48 p.m.