R/splitChar.R

Defines functions splitChar

Documented in splitChar

splitChar <- function(vector_v){
  #' Split character string
  #' @description Split character string into vector where length(output) == nchar(input)
  #' @param vector_v any character vector that needs to be separated into its component parts
  #' @return another vector of length == nchar(input)
  #' @examples 
  #' foo <- "ABCDE"
  #' splitChar(foo)
  #' @export
  
  outVector_v <- unlist(strsplit(vector_v, split = ''), use.names = F)
  
  return(outVector_v)
  
} # splitChar
weshorton/wrh.rUtils documentation built on Oct. 28, 2024, 7:24 a.m.