R/makeVectorNames.R

Defines functions makeVectorNames

Documented in makeVectorNames

#' makeVectorNames
#' This is an internal function that makes a vector of names
#'
#' @keywords internal
#'
#' @param namedList original list
#' @param attr attribute
#' @param selector value of attribute
#'
#' @return character vector

makeVectorNames <- function(namedList, attr, selector) {
  Vector <- integer()
  for (i in seq_along(namedList)) {
    if (attr(namedList[[i]], attr) == selector) {
      Vector <- c(Vector, i)
    }
  }
  nameVector <- names(namedList)[Vector]
  return(nameVector)
}

Try the idiogramFISH package in your browser

Any scripts or data that you put into this service are public.

idiogramFISH documentation built on Aug. 22, 2023, 5:08 p.m.