readEdfHeader: Read EDF(+) or BDF(+) file header

Description Usage Arguments Value Details Acknowledgement See Also Examples

Description

The function reads the header of an EDF (European Data Format) file, an EDF+ file, an BDF file, or an BDF+ file

Usage

1
readEdfHeader(fileName)

Arguments

fileName

The full path to the EDF(+)/BDF(+) file to be read.

Value

an object of class ebdfHeader

Details

The object returned contains also an object of class ebdfSHeaders. Both objects ebdfHeader and ebdfSHeaders have supporting S3 print and summary functions.
For object details see the package vignette.

Acknowledgement

This package has used code from:

See Also

edfReader, readEdfSignals
For the vignette use the console command:
vignette('edfReaderVignette', package = "edfReader")
or click on Index below.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Examples from the vignette
libDir <- system.file ("extdata", package="edfReader")
# a continuous recording
CFile <- paste (libDir, '/edfPlusC.edf', sep='')
CHdr  <- readEdfHeader (CFile)
CHdr                   # print the header
summary (CHdr)         # print a header summary
str (CHdr)             # look to the details
CHdr$sHeaders          # print the signal headers
summary(CHdr$sHeaders) # print a signal headers summary
str(CHdr$sHeaders)     # look to the signal header details
# for a discontinuous recording
DFile <- paste (libDir, '/bdfPlusD.bdf', sep='')
# and proceed as above to read the header and to show the results

Example output

Patient              : X X X X  
RecordingId          : Startdate 10-DEC-2009 X X test_generator  
StartTime            : 2009-12-10 12:44:02   
Continuous recording : TRUE  
Labels               : squarewave, ramp, pulse, ECG, noise, sine 1 Hz, sine 8 Hz, sine 8.5 Hz, sine 15 Hz, sine 17 Hz, sine 50 Hz, EDF Annotations  
File name            : /usr/lib/R/site-library/edfReader/extdata/edfPlusC.edf  
File type            : EDF+  
Version              : 0  
Patient              : X X X X  
RecordingId          : Startdate 10-DEC-2009 X X test_generator  
StartTime            : 2009-12-10 12:44:02   
Continuous recording : TRUE  
Recorded period      : 20 sec 
Ordinary signals     : 11  
Annotation signals   : 1  
Labels               : squarewave, ramp, pulse, ECG, noise, sine 1 Hz, sine 8 Hz, sine 8.5 Hz, sine 15 Hz, sine 17 Hz, sine 50 Hz, EDF Annotations  
List of 17
 $ fileName           : chr "/usr/lib/R/site-library/edfReader/extdata/edfPlusC.edf"
 $ fileType           : chr "EDF"
 $ version            : chr "0"
 $ patient            : chr "X X X X"
 $ recordingId        : chr "Startdate 10-DEC-2009 X X test_generator"
 $ startTime          : POSIXct[1:1], format: "2009-12-10 12:44:02"
 $ startSecondFraction: num 0
 $ headerLength       : int 3328
 $ reserved           : chr "EDF+C"
 $ nRecords           : int 20
 $ recordDuration     : num 1
 $ nSignals           : int 12
 $ recordedPeriod     : num 20
 $ sampleBits         : num 16
 $ isPlus             : logi TRUE
 $ isContinuous       : logi TRUE
 $ sHeaders           :Classes 'ebdfSHeaders' and 'data.frame':	12 obs. of  15 variables:
  ..$ label           : chr [1:12] "squarewave" "ramp" "pulse" "ECG" ...
  ..$ transducerType  : chr [1:12] "" "" "" "" ...
  ..$ physicalDim     : chr [1:12] "uV" "uV" "uV" "uV" ...
  ..$ physicalMin     : num [1:12] -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 ...
  ..$ physicalMax     : num [1:12] 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ...
  ..$ digitalMin      : int [1:12] -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 ...
  ..$ digitalMax      : int [1:12] 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 ...
  ..$ preFilter       : chr [1:12] "" "" "" "" ...
  ..$ samplesPerRecord: int [1:12] 200 200 200 200 200 200 200 200 200 200 ...
  ..$ reserved        : chr [1:12] "" "" "" "" ...
  ..$ gain            : num [1:12] 0.0305 0.0305 0.0305 0.0305 0.0305 ...
  ..$ offset          : num [1:12] 0.0153 0.0153 0.0153 0.0153 0.0153 ...
  ..$ sRate           : num [1:12] 200 200 200 200 200 200 200 200 200 200 ...
  ..$ isAnnotation    : logi [1:12] FALSE FALSE FALSE FALSE FALSE FALSE ...
  ..$ sLength         : int [1:12] 4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 ...
 - attr(*, "class")= chr "ebdfHeader"
Signal labels : squarewave, ramp, pulse, ECG, noise, sine 1 Hz, sine 8 Hz, sine 8.5 Hz, sine 15 Hz, sine 17 Hz, sine 50 Hz, EDF Annotations  
    EDF label/name      transducer sample rate preFilter 
 signal                                   /sec           
      1 squarewave                         200           
      2 ramp                               200           
      3 pulse                              200           
      4 ECG                                200           
      5 noise                              200           
      6 sine 1 Hz                          200           
      7 sine 8 Hz                          200           
      8 sine 8.5 Hz                        200           
      9 sine 15 Hz                         200           
     10 sine 17 Hz                         200           
     11 sine 50 Hz                         200           
     12 EDF Annotations n.a.              n.a. n.a.      
Classes 'ebdfSHeaders' and 'data.frame':	12 obs. of  15 variables:
 $ label           : chr  "squarewave" "ramp" "pulse" "ECG" ...
 $ transducerType  : chr  "" "" "" "" ...
 $ physicalDim     : chr  "uV" "uV" "uV" "uV" ...
 $ physicalMin     : num  -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 ...
 $ physicalMax     : num  1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ...
 $ digitalMin      : int  -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 ...
 $ digitalMax      : int  32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 ...
 $ preFilter       : chr  "" "" "" "" ...
 $ samplesPerRecord: int  200 200 200 200 200 200 200 200 200 200 ...
 $ reserved        : chr  "" "" "" "" ...
 $ gain            : num  0.0305 0.0305 0.0305 0.0305 0.0305 ...
 $ offset          : num  0.0153 0.0153 0.0153 0.0153 0.0153 ...
 $ sRate           : num  200 200 200 200 200 200 200 200 200 200 ...
 $ isAnnotation    : logi  FALSE FALSE FALSE FALSE FALSE FALSE ...
 $ sLength         : int  4000 4000 4000 4000 4000 4000 4000 4000 4000 4000 ...

edfReader documentation built on May 2, 2019, 3:43 p.m.