Turn any function into an HRF object
as_hrf.Rd
This is the core constructor for creating HRF objects in the refactored system. It takes a function `f(t)` and attaches standard HRF attributes.
Usage
as_hrf(
f,
name = deparse(substitute(f)),
nbasis = 1L,
span = 24,
params = list()
)
Arguments
- f
The function to be turned into an HRF object. It must accept a single argument `t` (time).
- name
The name for the HRF object. Defaults to the deparsed name of `f`.
- nbasis
The number of basis functions represented by `f`. Must be
>= 1
. Defaults to 1L.- span
The nominal time span (duration in seconds) of the HRF. Must be positive. Defaults to 24.
- params
A named list of parameters associated with the HRF function `f`. Defaults to an empty list.