create_phys_var: create_phys_var

View source: R/create_phys_var.R

create_phys_varR Documentation

create_phys_var

Description

creates data for each wrangling step of the physiological variable using the data wrangling functions: detrend(), upsample(), and deconvolve_afni()

Usage

create_phys_var(
  phys,
  detrend_factor,
  upsample_factor = NULL,
  hrf,
  afni_path = NULL,
  afni_quiet = FALSE
)

Arguments

phys

time series data

detrend_factor

factor to detrend the time series

upsample_factor

factor to upsample the time series for the deconvolution step (default: NULL)

hrf

hemodynamic response function (hrf) time series data

afni_path

path to afni directory (default: NULL)

Value

a list of datasets for each data wrangling step of the physiological variables

Examples

df <- read_csv("examples/sub-control01_task-music_run-1_bold_space-subj_vox-32-24-38")
phys_ts_file <- "examples/sub-control01_task-music_run-1_bold_space-subj_vox-32-24-38.csv"
phys_ts <- read.csv(phys_ts_file, header = F)
hrf <- create_hrf_afni("spmg1", 3, NULL)
phys_var <- create_phys_var(phys_ts_file, 2, 16, hrf)
summary(test)

epongpipat/ppi documentation built on Jan. 31, 2024, 1:02 p.m.