#' Standardize character vectors to a common format
-#' @param names_in Character vector
+#' @param str_in Character vector
#' @param word_delim Character defining the word delimiter for the output character
#' vector, either " " (space), ".", "-", or "_"
#' @return character vector of same dimensions as input vector, but with all
#' VCFs in PLINK, as they will by default be interpreted as delimiters for
#' family and individual IDs
#' @suggests stringdist, plyr
-stand_char <- function(names_in, word_delim = "-") {
+stand_str <- function(str_in, word_delim = "-") {
## Check for appropriate word delimiter selection
if(!word_delim %in% c(" ", "-", "_", ".")) {
## Convert everything to uppercase
- names_out <- toupper(names_in)
+ str_out <- toupper(str_in)
## Remove leading/trailing whitespace
- names_out <- trimws(names_out, which = "both")
+ str_out <- trimws(str_out, which = "both")
## Swap out whitespace, dash, period, underscore for selected delimiter
- names_out <- gsub("\\s|-|\\.|_", word_delim, names_out)
+ str_out <- gsub("\\s|-|\\.|_", word_delim, str_out)