AddMetaData: Adds metadata to a PRecording or PCollection object

AddMetaDataR Documentation

Adds metadata to a PRecording or PCollection object

Description

[Stable]
This function adds metadata to a PRecording or PCollection object by filling the MetaData slot. The function calling AddMetaData is stored in the .MetaDataFx slot.

Usage

AddMetaData(X, values, title = colnames(values), Verbose = T)

Arguments

X

A PRecording or PCollection object

values

The values to be added. Can be anything convertible into a matrix.

title

The title(s) for the metadata column(s).

Verbose

should the names/titles of the columns added be printed?

Details

The MetaData slot
In a PRecording object the MetaData slot is a matrix with each row corresponding to a sweep.
In a PCollection object the MetaData slot is a matrix with each row corresponding to a PRecording stored in the object. Column names must be unique.

Value

A PRecording or PCollection object, respectively.

See Also

PRecording, PCollection, apply(), lapply(), as.matrix()

Examples

data("PRecording")
# add two columns of metadata
SampleData<-AddMetaData(SampleData,1:length(GetSweepNames(SampleData)),"ID1")
SampleData<-AddMetaData(SampleData,length(GetSweepNames(SampleData)):1,"ID2")
GetMetaData(SampleData,"ID1")
GetMetaData(SampleData)

moritzlindner/PatchR documentation built on April 30, 2024, 1:40 a.m.