% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree-structure.R
\name{divergencePreferenceDip}
\alias{divergencePreferenceDip}
\title{Calculate visitation divergence based on bimodality of visitation preference}
\usage{
divergencePreferenceDip(
  visit.data,
  cells.in.windows,
  cells.segment.1,
  cells.segment.2
)
}
\arguments{
\item{visit.data}{(data.frame) Rows are cells, columns are: "segment.1" and "segment.2" (visitation frequency from random walks
initiated in segment 1 and 2), "pseudotime" (the pseudotime of each cell), and "pseudotime.group" (the number of the pseudotime
bin each cell belongs to)}

\item{cells.in.windows}{(List) List of character vectors, giving names of cells in each pseudotime window.}

\item{cells.segment.1}{(Character vector) Cells in segment 1}

\item{cells.segment.2}{(Character vector) Cells in segment 2}
}
\value{
(data.frame) Rows are pseudotime windows, columns are a numeric representation of whether (0 or 1) ("p"), pseudotime of cells in the window ("mean.pseudotime", "min.pseudotime", "max.pseudotime"), and number of cells considered from each segment ("cells.visited.seg1", "cells.visited.seg2")
}
\description{
Calculates the preference of each cell for the two tips, tests for unimodality using Hartigan's dip test, and
if unimodal, tests the mean to make sure that it's
}
\keyword{internal}
