% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/miscellaneous.R
\name{parse_formula_vars}
\alias{parse_formula_vars}
\title{Parse Formula Variables}
\usage{
parse_formula_vars(formula)
}
\arguments{
\item{formula}{The initial formula for the model, typically specified using R's formula syntax (e.g.,  \code{y ~ x + f(x1 + x2)}).}
}
\value{
A list containing:
\itemize{
\item \code{response}: The response variable(s) extracted from the formula.
\item \code{intercept}: A logical value indicating whether the formula includes an intercept (default is TRUE).
\item \code{dot}: A logical value indicating whether the formula includes a dot (.) representing all other variables (default is FALSE).
\item \code{outside}: A vector of variables that are outside any specified patterns. It includes the variables that are not detected within the specified patterns in the formula.
\item \code{inside}: A list where each element corresponds to a detected pattern (e.g., function name) and contains the variables found inside that pattern. For example, if the formula includes \code{asym(x1 + x2)}, the \code{inside} list will have an element named "asym" containing the variables "x1" and "x2". This allows for easy identification of variables that are part of specific constructs in the formula.
}
}
\description{
The \code{parseFormula()} function analyzes a given formula to identify and extract variables that match specified patterns. It is particularly useful for isolating variables enclosed within certain functions or constructs in the formula, such as \code{asym()}, \code{det()}, or any user-defined patterns.
}
\examples{

# Parse formulas containing various collection types like ()
formula_ <- y ~ x +det(s -gg- d) + asymS(d2 -rr+ s)-mm(y1+y2+y3)+asym(k1+k2+k3)+trend-huseyin
# Extract variables
parse_formula_vars(formula_)


}
\seealso{
\code{\link[stats]{formula}} and \code{\link[base]{gregexpr}}
}
