% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cut_equal.r
\name{cut_equal}
\alias{cut_equal}
\title{cut function for (appr.) equal intervals}
\usage{
cut_equal(x, n, type = 1, ntries = 1000)
}
\arguments{
\item{x}{the vector that should be cut into equal bins}

\item{n}{the number of bins that should be used}

\item{type}{the type of algorithm to be used (see details)}

\item{ntries}{number of samples/tries for type 2}
}
\value{
a character vector with the categories/bins
}
\description{
This function uses cut to make categories based on approximately equal number of bins
}
\details{
Generating equal bins can be quite difficult. There are multiple ways of
assessing if bins are equal. This function provides a method based on quantiles
(type=1) or a method based on sampling proposed by M. Ruppert (type=2). In general
type 1 is faster but less accurate, while type 2 is slower and more accurate
(in case of a reasonable ntries)
}
\examples{

 table(cut_equal(1:20,5))
}
\author{
Richard Hooijmaijers
}
