R/color_groups.R

Defines functions color_groups

Documented in color_groups

#' Add color to each sample. Samples with the same color belong to the same group
#' @author Simon J Pelletier
#' @param names Names of each sample
#' @param names.unique Name of each group
#' @return A vector of strings corresponding to the color of all samples.
#' @export
color_groups = function(names,names.unique){
  colors = vector("character",length(names))
  for (i in 1:length(names.unique)){
    colors[(grep(names.unique[i],names))] = wes()[i]
  }
  return(colors)
}
spell098/rnaseq_app documentation built on May 30, 2019, 7:57 a.m.