% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{calc_bin}
\alias{calc_bin}
\title{Calculate binwidths by parameter, based on the total number of bins.}
\usage{
calc_bin(x, bins = bins)
}
\arguments{
\item{x}{any vector or variable}

\item{bins}{the number of requested bins}
}
\value{
A data frame with the x location, the width of the bars and the number of observations at each x location.
}
\description{
Compute the minimal elements to recreate a histogram manually by defining the total number of bins.
}
\details{
Internal function to compute the minimal elements to recreate a histogram manually by defining the total number of bins, used by \code{\link{ggs_histogram}} \code{\link{ggs_ppmean}} and \code{\link{ggs_ppsd}}.
}
