R/invert_dictionary.R

Defines functions invert_dictionary

Documented in invert_dictionary

#' Invert dictionary
#'
#' Switch the names/items in a named list.
#'
#' @return Named list
#' @importFrom stats setNames
#' @keywords internal
invert_dictionary <- function(dict) {
    stats::setNames(names(dict), unname(dict))
}
neurogenomics/orthogene documentation built on Jan. 30, 2024, 4:44 a.m.