\HeaderA{summarytable}{Summarize the matest result.}{summarytable}
\keyword{utilities}{summarytable}
\begin{Description}\relax
This function returns list of probe ID with p-value, FDR adjusted p-value or
fold change selected by given threshold.
\end{Description}
\begin{Usage}
\begin{verbatim}
summarytable(matestobj, method=c("Fold.change","Pvalperm","adjPvalperm"), 
     test =c("F1","Fs"),whichTest=c("F1.Pvalperm","F1.adjPvalperm", 
         "Fs.Pvalperm","Fs.adjPvalperm"), 
         threshold, outfile="summarytable.csv")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{matestobj}] An object of class \code{matest}, which is the result
from \code{\LinkA{matest}{matest}}.
\item[\code{method}] Results that you want to include in the output among
Fold.change, Pvalperm and adjPvalperm. Default is possible every field.
\item[\code{test}] Test that you want to include in the output among F1, Fs and
Fss. Default is possible every test.
\item[\code{whichTest}] Test result used to get the subset. If whichTest is not
provided, save all result. 
\item[\code{threshold}] Threshold that you want to get the subset. If threshold is
not provided, save all result.
\item[\code{outfile}] File name that you want to save the result. Default name is 'summarytable.csv'
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function use
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{result}] It returns result fields (among Fold.change, P-value or adjust
P-value if you selected) from test statistics (among F1, Fs or Fss
statistics if you selected), subsetted by given statistics ('whichtest') is
smaller than 'threshold'.
\item[\code{outfile}] .csv file saved under the working directory.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Hyuna Yang
\end{Author}
\begin{Examples}
\begin{ExampleCode}
data(abf1)
## Not run: 
 
fit.full.simple = fitmaanova(abf1,formula = ~ Strain)
# F-test strain effect
ftest.all = matest(abf1, fit.full.simple, term="Strain", n.perm= 1000)
# make FDR adjusted P values
ftest.all = adjPval(ftest.all, 'jsFDR')
summarytable(ftest.all, outfile='all.csv')
smallset = summarytable(ftest.all, method ='Pvalperm',
test=c('F1','Fs'), whichTest='Fs.Pvalperm', threshold = 0.1)
## End(Not run)\end{ExampleCode}
\end{Examples}

