R/invert_dict.R

Defines functions invert_dict

Documented in invert_dict

#' Invert dictionary
#' 
#' Swap the names/values from a named vector. 
#' 
#' @param dict Named vector. 
#' 
#' @keywords internal 
invert_dict <- function(dict){
    stats::setNames(names(dict), unname(dict))
}
neurogenomics/MAGMA_Celltyping documentation built on Oct. 12, 2024, 12:36 a.m.