ECoGTensor: 'iEEG/ECoG' Tensor class inherit from 'Tensor'

Description Super class Methods Author(s)

Description

Four-mode tensor (array) especially designed for 'iEEG/ECoG' data. The Dimension names are: Trial, Frequency, Time, and Electrode.

Super class

raveutils::Tensor -> ECoGTensor

Methods

Public methods

Inherited methods

Method flatten()

converts tensor (array) to a table (data frame)

Usage
ECoGTensor$flatten(include_index = TRUE, value_name = "value")
Arguments
include_index

logical, whether to include dimension names

value_name

character, column name of the value

Returns

a data frame with the dimension names as index columns and value_name as value column


Method new()

constructor

Usage
ECoGTensor$new(
  data,
  dim,
  dimnames,
  varnames,
  hybrid = FALSE,
  swap_file = tempfile(),
  temporary = TRUE,
  multi_files = FALSE,
  use_index = TRUE,
  ...
)
Arguments
data

array or vector

dim

dimension of data, mush match with data

dimnames

list of dimension names, equal length as dim

varnames

names of dimnames, recommended names are: Trial, Frequency, Time, and Electrode

hybrid

whether to enable hybrid mode to reduce RAM usage

swap_file

if hybrid mode, where to store the data

temporary

whether to clean up the space when exiting R session

multi_files

logical, whether to use multiple files instead of one giant file to store data

use_index

logical, when multi_files is true, whether use index dimension as partition number

...

further passed to Tensor constructor

Returns

an ECoGTensor instance

Author(s)

Zhengjia Wang


dipterix/raveutils documentation built on July 6, 2020, 12:24 a.m.