% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_partial_match.R
\name{check_partial_match}
\alias{check_partial_match}
\title{Check if the Partial Match is correct.}
\usage{
check_partial_match(fargs1, fargs2, print = 0)
}
\arguments{
\item{fargs1}{as sys.call() formal arguments}

\item{fargs2}{as match.call()  result of the matching}

\item{print}{= 1 or 2 to print the details.}
}
\description{
Check if the Partial Match is correct.
}
\details{
This function checks if the arguments listed in ... are correctly
matched to the formal arguments of teh called function. \cr
The error may occur when ... contains single-lettered arguments.
\cr
This function should be called at the beginning of any function
which has ... as its formal argument.
}
\examples{
test1 <- function( alpha=0, beta=0, gamma=0, ... ){
 #
 cat("\nTop of test1\n")

 check_partial_match( sys.call(), match.call() )

 cat("\n Back to test1\n")
 Print(alpha,beta,gamma)
 val=list(...)
 cat("\n ... contains below:\n")
 print(val)
 cat("\nBottom of test1\n")

} # end of test1


test2 <- function(a){
  res=test1( alpha=1, b=rep(9,3), d=2,xx=4, g=8, print=1 )
} # end of test2


test3 <- function(a){
  res=test1( alpha=1, beta=2, gamma=3, b=rep(9,3), d=2,xx=4, g=8, print=1 )
} # end of test2


test3()

# If run, below caues error.
# test2()

}
