\name{ttest}
\alias{ttest}
\title{ t test}
\description{
 t-test
}
\usage{
ttest(x, y, var.equal = FALSE)
}
\arguments{
  \item{x}{ a numeric vector of data values }
  \item{y}{ a numeric vector of data values}
  \item{var.equal}{ a logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used. }
}

\value{
  a list
  \item{tstat }{ t staistics }
  \item{pval }{ two-sided pvalue }
}
\author{ Wei Sun weisun@unc.edu }
\note{ this function is designed to be called by ap.ttest, so no input checking is done. If used it alone, need to make sure there is no missing value for both x and y. }

\keyword{ methods }
