
  # -------------------------------------------------------------------------------------------------------------------------  #
  #  -----------------------------------------------------------------------------------------------------------------------   #
  #                                                                                                                            #
  #           File Name              :  sortColsIgnoreSuffix_.r                                                                #
  #           Last Updated Funclist  :  08 Feb 2015,  5:12 AM (Sunday)                                                         #
  #                                                                                                                            #
  #           Author Name            :  Rick Saporta                                                                           #
  #           Author Email           :  RickSaporta@gmail.com                                                                  #
  #           Author URL             :  www.github.com/rsaporta                                                                #
  #                                                                                                                            #
  #           Packages Called        :  NA                                                                                     #
  #           Packages Used via NS   :  NA                                                                                     #
  #                                                                                                                            #
  #  -----------------------------------------------------------------------------------------------------------------------   #
  #                                                                                                                            #
  #   sortColsIgnoreSuffix_ ( DT, suffixes, startCols=key(DT), sortAllColsAlphabetically.exceptStartCols=FALSE )               #
  #                                                                                                                            #
  #                                                                                                                            #
  #                                                     <END FUNCS>                                                            #
  #  -----------------------------------------------------------------------------------------------------------------------   #
  # -------------------------------------------------------------------------------------------------------------------------  #

sortColsIgnoreSuffix_ <- function(DT, suffixes, startCols=key(DT), sortAllColsAlphabetically.exceptStartCols=FALSE) {

  warning ("This function not yet implemented") 
  
#  if (!is.null(startCols) && any(startCols %ni% names(DT)))
#    stop("Some cols in startCols are not in DT: ", pasteQand(setdiff(names(DT), startCols)))
#
#  nms <- names(DT)
#  selfname_(nms)
#
#  patSuffix <- function(suffix) 
#    paste0(escapeRegEx(suffix), "$")
#
#  for (suffix in suffixes)
#    nms <- gsub(patSuffix(suffix), "", nms)
#
#  if (sortAllColsAlphabetically.exceptStartCols) {
#    nms.ret <- c(startCols, sort(nms)[sort(nms) %ni% startCols])
#  ## Otherwise, sort only the duplicated columns, according to when they first appeared
#  } else {
#    for (nm in nms[duplicated(nms)]) {
#      wh <- which(nms == nm)
#      if (length(wh)) {
#
#      }
#      nms[-wh]
#
#    }
#
#    &&& LEFT OFF HERE
#  }
}

