\Header{pm.abstGrep}{An interface to grep for PubMed abstracts.}
\keyword{manip}{pm.abstGrep}
\begin{Description}\relax
A user friendly interface to the functionality provided by
\code{pubmed}.
\end{Description}
\begin{Usage}
\begin{verbatim}
pm.abstGrep(pattern, absts, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{pattern}] A pattern for the call to \code{grep}. 
\item[\code{absts}] A list containing abstracts downloaded using \code{pubmed} or
equivalent. 
\item[\code{...}] Extra arguments passed to \code{grep}. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{absts} are a list of PubMed XML objects that have been downloaded 
and parsed. This function lets the user quickly search the abstracts
for any regular expression. The returned value is a logical vector
indicating which of the abstracts contain the regular expression.
\end{Details}
\begin{Value}
The returned value is a logical vector
indicating which of the abstracts contain the regular expression.
\end{Value}
\begin{Author}\relax
Robert Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{pm.getabst}}, \code{\Link{pm.titles}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  hoxa9 <- "37809_at"

   ## A bit of a hack to not have a package dependency on hgu95av2
   ## but need to fiddle w/ the warn level to not fail the example anyways.
   curWarn <- getOption("warn")
   options(warn=0)
   on.exit(options(warn=curWarn), add=TRUE)
  if( require(hgu95av2) ) {
     absts <- pm.getabst(hoxa9, "hgu95av2")

     pm.abstGrep("NUP98", absts[[1]])

     pm.abstGrep("apoptosis", absts[[1]])
  }

\end{ExampleCode}
\end{Examples}

