Skip to content

ERP software

6 messages · Mark M. Span, Tim Hoar, Duncan Murdoch +1 more

#
----- Original Message -----
From: "Bill Simpson" <wsi at gcal.ac.uk>
To: "Mark M. Span" <span at psy.uva.nl>
Sent: Thursday, July 05, 2001 4:02 PM
Subject: Re: [R] ERP software
Rstreams reads in binary data (in the non-text meaning of binary). I guess
most of us (???) have dedicated software for data collection though..
We use a dataformat that is simple: all the data are written as two-byte
integers, channelwise.

reading in the data for analysis is a simple

 s <- openstream("U:/d1x001.eeg", "read")
 dat<-matrix(readint(s, n=33*3000000, size = 2, signed = F, swapbytes =
FALSE), ncol=33, byrow=T)   # for 33 channel eeg, 3000000 datapoints (R
complaints about memory here)
 closestream(s)
 plot(dat[1:1000,31])  # plot the 31'th channel

The additional software would then cut up the matrix into (a list) of
trials...

almost looks too easy doesn't it...
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
I think you're missing the point about *realtime* ...

opening and reading a static file is one thing -- having event-driven
reads (i.e. potentially asynchronous reads) directly from the instrument
is another.

I have not tried anything of this sort in R ... sorry.
## Tim Hoar, Associate Scientist              email: thoar at ucar.edu     ##
## Geophysical Statistics Project             phone: 303-497-1708       ##
## National Center for Atmospheric Research   FAX  : 303-497-1333       ##
## Boulder, CO  80307                    http://www.cgd.ucar.edu/~thoar ##

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 5 Jul 2001 11:50:07 -0600 (MDT), you wrote in message
<Pine.GSO.4.30.0107051146130.3217-100000 at goldhill.cgd.ucar.edu>:
If the instrument can be opened as a Unix file, then connections
should work, as should the older Rstreams.  You don't have event
driven programming in R, but you can tell your R code to run a loop
where it tries to read the next input from the instrument.  If there's
nothing available, it will block until the data arrives, just like
"cat" or any other Unix utility would.

See ?connections for help.

Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 5 Jul 2001, Duncan Murdoch wrote:

            
You can also have non-blocking connections in 1.3.0, especially on fifos
(but only on Unix).  I am not sure we have the optimal semantics, so
feedback on this would be welcome (on R-devel, I think as it can be very
technical).

  
    
#
I'm not sure that R is the ideal environment to do this sort of thing in.
Most labs **have** dedicated software to gather the data from the card. My
intention was to use R for the analysis of the data. That's what R was
developed for, wasn't it?
I'm not even sure how much 'specialized' software for this analysis is
needed. Matrix subsetting could be enough for the trial-making,
badpass filters, hanning filters, EOG regression and artefact detection
don't seem to be a *major* problem.
These things could be 'tailored' for ERP study and packaged, and I was
wondering if anyone looked into this before.

----- Original Message -----
From: "Prof Brian D Ripley" <ripley at stats.ox.ac.uk>
To: "Duncan Murdoch" <murdoch at stats.uwo.ca>
Cc: "Tim Hoar" <thoar at ucar.edu>; <r-help at stat.math.ethz.ch>
Sent: Thursday, July 05, 2001 10:50 PM
Subject: Re: [R] ERP software
instrument
-.-.-
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 6 Jul 2001, Mark M. Span wrote:

            
Right, and data being collected in real time may need continuous/continual
(re-)analysis.  That's the aim of non-blocking connections and the
upcoming readers and event handlers: you can always do the analysis on the
current data.  People had in mind financial and sales feeds, but there are
lots of potential sciencitfic applications too.  I don't think people are
envisaging R reading from the card, but they are envisaging the capture
software writing to a fifo and R reading from that fifo.