Write a European Data Format (EDF) record file to disk using Morpheo Data Format (MDF) guidelines. Target directory is erased if it already exists. Signals are stored in binary file, events and metadata in JavaScript Object Notation (JSON) files.

write_mdf(
  edfPath,
  mdfPath,
  channels = c(NA),
  events = c(),
  endian = .Platform$endian
)

Arguments

edfPath

character. European Data Format (EDF) file path.

mdfPath

character. Morpheo Data Format (MDF) directory path.

channels

character. Vector of channels labels to write.

events

dataframe. Events dataframe to write. Events dataframe. Dataframe must contain begin (POSIXt), end (POSIXt) and event (character) columns.

endian

character. Endianess. "big" or "little". Defaults to platform endian.

References

P. Bouchequet, D. Jin, G. Solelhac, M. Chennaoui, D. Leger, "Morpheo Data Format (MDF), un nouveau format de données simple, robuste et performant pour stocker et analyser les enregistrements de sommeil", Médecine du Sommeil, vol. 15, n 1, p. 48/49, march 2018.