% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chars_structure_general.R
\name{chars_structure_general}
\alias{chars_structure_general}
\title{Generalized characters structure}
\usage{
chars_structure_general(
  input_vector,
  split = "",
  patterns_and_replacements,
  unique = TRUE,
  named_output = TRUE
)
}
\arguments{
\item{input_vector}{Character. Vector to process}

\item{split}{Character 1L. Symbol separator}

\item{patterns_and_replacements}{Character. Named character vector of patterns (names) and replacements (values)}

\item{unique}{Logical 1L. If TRUE, the result is reduced to unique values}

\item{named_output}{Logical 1L. If TRUE, output vector is named after corresponding input values.}
}
\value{
A character vector describing the generalized structure of each
element of \code{input_vector}. If \code{named_output} is \code{TRUE},
the vector is named after the corresponding input values. If
\code{unique} is \code{TRUE}, only structures for unique input values
are returned; otherwise one structure per element of \code{input_vector}.
}
\description{
Get any user-defined patterns from each symbol of character vector
}
\examples{

input <- c("ABC123", "DE4F56", "789GHI", "ABC123")

# Default values of unique and named_output:
chars_structure_general(input_vector = input, split = "", 
                        patterns_and_replacements = c("[:alpha:]" = "[letter]", 
                                                      "[:digit:]" = "[number]"), 
                        unique = TRUE, named_output = TRUE)

# unique is set to default value TRUE and named_output is set to FALSE:
chars_structure_general(input_vector = input, split = "", 
                        patterns_and_replacements = c("[:alpha:]" = "[letter]", 
                                                      "[:digit:]" = "[number]"), 
                        unique = TRUE, named_output = FALSE)

# unique is set to FALSE and named_output to FALSE:
chars_structure_general(input_vector = input, split = "", 
                        patterns_and_replacements = c("[:alpha:]" = "[letter]", 
                                                      "[:digit:]" = "[number]"), 
                        unique = FALSE, named_output = FALSE)

# unique is set to FALSE and named_output to defalut value TRUE:
chars_structure_general(input_vector = input, split = "", 
                        patterns_and_replacements = c("[:alpha:]" = "[letter]", 
                                                      "[:digit:]" = "[number]"), 
                        unique = FALSE, named_output = TRUE)
}
