% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_synthetic_data.R
\name{as_replicate}
\alias{as_replicate}
\title{Get numeric vector with the count of the replicate for each element}
\usage{
as_replicate(x)
}
\arguments{
\item{x}{a vector with repeated elements}
}
\value{
numeric vector
}
\description{
For a vector with repeated values return a vector where each element
is the count how often the element was observed previously
}
\examples{
  x <- c("a", "b", "a", "b", "b", "d")
  all(proDA:::as_replicate(x) == c(1,1,2,2,3,1))

}
\seealso{
\code{\link[base]{order}}, \code{\link[base]{rank}}
}
\keyword{internal}
