R/subset_dist.R

subset.dist <- function (dist,subset) 
{
    if (!inherits(dist,'dist')) stop('You must pass an object of class dist')

    dist <- as.dist(as.matrix(dist)[subset,subset])
    dist
}

Try the labdsv package in your browser

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

labdsv documentation built on April 10, 2023, 5:08 p.m.