% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/settings.R
\name{kardl_set}
\alias{kardl_set}
\title{Function to Set KARDL Package Options}
\usage{
kardl_set(. = FALSE, ...)
}
\arguments{
\item{.}{If provided and not `FALSE`, the function will return this value after setting the options. If not provided or set to `FALSE`, it will return the current settings.}

\item{...}{Named arguments corresponding to the options to be set. Valid option names include those defined in the kardl package settings.}
}
\value{
If no arguments are provided, returns all options as a list. If named arguments are provided, sets those options and returns the updated list.

If no arguments are provided, returns all options as a list. If named arguments are provided, sets those options and returns the updated list.
}
\description{
This function allows users to set options for the kardl package. Users can specify named arguments to set options or call the function without arguments to retrieve all current settings.
}
\examples{
# Set options
kardl_set(maxlag = 5, mode = "grid")
# Get all options
kardl_get()
# Get specific options
kardl_get("maxlag", "mode")

# Note: In interactive use, avoid calling kardl_get() directly to prevent cluttering the console.

\donttest{
kardl_get()
}

# Example with magrittr pipe
library(magrittr)
# Set custom coefficient naming conventions

MyFormula<-CPI~ER+PPI+asym(ER)+deterministic(covid)+trend
kardl_set(ShortCoef = "L___{lag}.d.{varName}", formula = MyFormula, data = imf_example_data)
imf_example_data \%>\%   kardl(MyFormula)

kardl_reset()
kardl_get()

imf_example_data \%>\%  kardl_set(LongCoef= "LK{lag}_{varName}",ShortCoef = "D{lag}.d.{varName}") \%>\%
kardl(MyFormula)
kardl_get(c("LongCoef","ShortCoef"))

}
\seealso{
\code{\link{kardl_get}}, \code{\link{kardl_reset}}
}
