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 1:length(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 Jan. 11, 2022, 1:08 a.m.