% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/val_labels.R
\name{sort_val_labels}
\alias{sort_val_labels}
\title{Sort value labels}
\usage{
sort_val_labels(x, according_to = c("values", "labels"), decreasing = FALSE)
}
\arguments{
\item{x}{A labelled vector or a data.frame}

\item{according_to}{According to values or to labels?}

\item{decreasing}{In decreasing order?}
}
\description{
Sort value labels according to values or to labels
}
\examples{
v <- labelled(c(1, 2, 3), c(maybe = 2, yes = 1, no = 3))
v
sort_val_labels(v)
sort_val_labels(v, decreasing = TRUE)
sort_val_labels(v, "l")
sort_val_labels(v, "l", TRUE)
}
