% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rainette.R
\name{switch_docs}
\alias{switch_docs}
\title{Switch documents between two groups to maximize chi-square value}
\usage{
switch_docs(m, indices, max_index, max_chisq)
}
\arguments{
\item{m}{original dtm}

\item{indices}{documents indices orderes by first CA axis coordinates}

\item{max_index}{document index where the split is maximum}

\item{max_chisq}{maximum chi-square value}
}
\value{
a list of two vectors \code{indices1} and \code{indices2}, which contain
the documents indices of each group after documents switching, and a \code{chisq} value,
the new corresponding chi-square value after switching
}
\description{
Switch documents between two groups to maximize chi-square value
}
\details{
Internal function, not to be used directly
}
