\HeaderA{feller.read.spikes}{Read in a directory of spike times from Marla Feller and create
a "spikes" data structure.}{feller.read.spikes}
\begin{Description}\relax
Marla Feller has provided MEA data from an hexagonal array.  The data
from each electrode is stored in a separate file.
This function reads those text files and
creates a "spikes" data structure.
\end{Description}
\begin{Usage}
\begin{verbatim}
feller.read.spikes(filename, ids=NULL, time.interval=1,
                   beg=NULL, end=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{filename}] Name of the text file to be read in.
\item[\code{ids}] Which electrodes should be kept.
\item[\code{time.interval}] How often to estimate the firing rate.
\item[\code{beg}] Start time of the recording.
\item[\code{end}] End time of the recording.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The data from each electrode is not in seconds; divide by 20000 to get
the time in seconds.
\end{Details}
\begin{Value}
Return the data structure 's'.
\end{Value}
\begin{Author}\relax
Stephen Eglen
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{jay.read.spikes}{jay.read.spikes}}
\code{\LinkA{sanger.read.spikes}{sanger.read.spikes}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data.file <- system.file('examples', '2002-11-26-1', package='sjemea')
s <- feller.read.spikes(data.file)
ejcmealayout.check()
fourplot(s)

## next two examples show electrodes being rejected/accepted.
s <- feller.read.spikes(data.file, ids=c('-', 'a7a', 'b1a', 'h2a'))
s <- feller.read.spikes(data.file, ids=c(     'a7a', 'b1a', 'h2a'))

\end{ExampleCode}
\end{Examples}

