gen_hrf | R Documentation |
gen_hrf
takes a raw function f(t)
and returns an HRF (Hemodynamic Response Function) instance.
gen_hrf(
hrf,
lag = 0,
width = 0,
precision = 0.1,
summate = TRUE,
normalize = FALSE,
name = "gen_hrf",
span = NULL,
...
)
hrf |
A function mapping from time to signal. |
lag |
Optional lag in seconds. |
width |
Optional block width in seconds. |
precision |
Sampling precision in seconds. |
summate |
Whether to allow each impulse response function to "add" up (default: TRUE). |
normalize |
Rescale so that the peak of the output is 1 (default: FALSE). |
name |
The assigned name of the generated HRF. |
span |
The span of the HRF (maximum width in seconds after which function reverts to zero). |
... |
Extra parameters for the |
An instance of type HRF
inheriting from function
.
## Generate an HRF using SPMG1 canonical HRF, a lag of 3, and a width of 2.
grf <- gen_hrf(hrf_spmg1, lag=3, width=2)
grf(0:20)
hg <- purrr::partial(hrf_gaussian, mean=4, sd=1)
grf <- gen_hrf(hg, lag=1, width=2)
vals <- grf(0:20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.