R/amalgamateElementsOfList_intoCharacter.R

Defines functions amalgamateElementsOfList_intoCharacter

#' Amalgamate elements of the list into a single chracter character
#' 
#' @param x List of characters of any length we wish to amalgamate into character of length 1. 
#' @param sep Character to be used to delimate the words in the final amalgamated string. 
#' @return Amalgamated character vector of length one 
#' @author Alexander Kheirallah ([email protected])
#' @export
#' 

amalgamateElementsOfList_intoCharacter = function(x,sep="-"){
  out = sep
  for(i in 1:length(x)){
    out = paste(out,x[i],sep=sep)
  }
  out = paste(out,sep,sep="")
  out = paste(out,sep,sep="")
  out
}
msxakk89/dat documentation built on April 3, 2020, 5:39 p.m.