compute_tfr: Compute Time-Frequency representation of EEG data

Description Usage Arguments Methods (by class) Author(s) Examples

View source: R/tfr_analysis.R

Description

This function creates a time frequency represention of EEG time series data. Currently, the only available method is a Morlet wavelet transformation performed using convolution in the frequency domain.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
compute_tfr(data, ...)

## Default S3 method:
compute_tfr(data, ...)

## S3 method for class 'eeg_epochs'
compute_tfr(
  data,
  method = "morlet",
  foi,
  n_freq,
  n_cycles = 7,
  keep_trials = FALSE,
  output = "power",
  downsample = 1,
  verbose = TRUE,
  ...
)

## S3 method for class 'eeg_evoked'
compute_tfr(
  data,
  method = "morlet",
  foi,
  n_freq,
  n_cycles = 7,
  keep_trials = FALSE,
  output = "power",
  downsample = 1,
  verbose = TRUE,
  ...
)

Arguments

data

An object of class eeg_epochs.

...

Further TFR parameters

method

Time-frequency analysis method. Defaults to "morlet".

foi

Frequencies of interest. Scalar or character vector of the lowest and highest frequency to resolve.

n_freq

Number of frequencies to be resolved. Scalar.

n_cycles

Scalar. Number of cycles at each frequency. Currently only supports a single number of cycles at all frequencies.

keep_trials

Keep single trials or average over them before returning. Defaults to FALSE.

output

Sets whether output is power, phase, or fourier coefficients.

downsample

Downsampling factor. Integer. Selects every n samples after performing time-frequency analysis.

verbose

Print informative messages in console.

Methods (by class)

Author(s)

Matt Craddock matt@mattcraddock.com

Examples

1
compute_tfr(demo_epochs, method = "morlet", foi = c(4, 30), n_freq = 10, n_cycles = 3)

kusumikakd/EEG documentation built on June 28, 2020, 12:30 a.m.