% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internals.R
\name{dist.unifrac}
\alias{dist.unifrac}
\title{Calculate weighted or unweighted UniFrac distances. Adopted from fastUniFrac() from phyloseq}
\usage{
dist.unifrac(abund, tree, weighted = FALSE, normalise = TRUE, num_threads = 1L)
}
\arguments{
\item{abund}{Abundance table with OTU counts, in \code{ampvis2} objects it is available with simply data$abund}

\item{tree}{Phylogenetic tree (rooted and with branch lengths) as loaded with \code{\link[ape]{read.tree}}.}

\item{weighted}{Calculate weighted or unweighted UniFrac distances.}

\item{normalise}{Should the output be normalised such that values range from 0 to 1 independent of branch length values? Note that unweighted UniFrac is always normalised. (\emph{default:} \code{TRUE})}

\item{num_threads}{The number of threads to be used for calculating UniFrac distances. If set to more than \code{1} then this is set by using \code{\link[doParallel]{registerDoParallel}}. (\emph{default:} \code{1})}
}
\value{
A distance matrix of class \code{dist}.
}
\description{
Calculate weighted or unweighted UniFrac distances. Adopted from fastUniFrac() from phyloseq
}
\author{
Kasper Skytte Andersen \email{ksa@bio.aau.dk}
}
\keyword{internal}
