R/as.Dtable.data.frame.R

as.Dtable.data.frame <-
function (X, ...)
{
  # Convert X to a wmppp
  X <- as.wmppp.data.frame(X, ...)
  
  # Get the distance matrix
  Dmatrix <- spatstat.geom::pairdist(X)
  
  # Convert
  return (Dtable(Dmatrix, PointType=X$marks$PointType , PointWeight=X$marks$PointWeight))
}

Try the dbmss package in your browser

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

dbmss documentation built on May 31, 2023, 8:30 p.m.