% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/val_labels.R
\name{names_prefixed_by_values}
\alias{names_prefixed_by_values}
\title{Turn a named vector into a vector of names prefixed by values}
\usage{
names_prefixed_by_values(x)
}
\arguments{
\item{x}{vector to be prefixed}
}
\description{
Turn a named vector into a vector of names prefixed by values
}
\examples{
df <- dplyr::tibble(
  c1 = labelled(c("M", "M", "F"), c(Male = "M", Female = "F")),
  c2 = labelled(c(1, 1, 2), c(Yes = 1, No = 2))
)
val_labels(df$c1)
val_labels(df$c1) \%>\% names_prefixed_by_values()
val_labels(df)
val_labels(df) \%>\% names_prefixed_by_values()
}
