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))
}
NathanSkene/MAGMA_Celltyping documentation built on Oct. 11, 2024, 7:19 a.m.