lattach: Attaches an EDF from a sample list

View source: R/luna.R

lattachR Documentation

Attaches an EDF from a sample list

Description

Loads an EDF and any associated annotation files from a sample-list loaded by lsl.

Usage

lattach(sl, idx = "")

Arguments

sl

a sample-list as loaded by lsl

idx

either an integer number (in which case, it means to attach the EDF/annotations specified on that row of the sample-list), or a string value (in which case, it is interpreted as the ID of the individual/EDF to be attached)

Value

No explicit return value: this command sets the in-memory EDF representation to reflect this EDF header/file, by calling ledf

Note

As well as attaching that EDF, this calls lstat to display some basic information about it. If the index or ID is out-of-range/not found, this command will give an error

Unlike many R functions, lattach() does not return an object that represents the data (i.e. the EDF). Rather, lunaR is designed to operate on one EDF at a time; attached EDFs can be displayed with the lstat function. Attaching a new EDF effectively detaches any previously attached EDF.

Examples

## Not run: 
> lattach(sl, 2)
nsrr02 : 14 signals, 10 annotations, of 09:57:30 duration

> lattach(sl, "nsrr02")
nsrr02 : 14 signals, 10 annotations, of 09:57:30 duration

## End(Not run)

remnrem/luna documentation built on June 1, 2025, 2:14 p.m.