evaluate | R Documentation |
Generic function to evaluate a regressor object over a specified time grid. Different types of regressors may have different evaluation methods.
evalute a regressor function over a sampling grid
evaluate(x, grid, ...)
## S3 method for class 'regressor'
evaluate(x, grid, precision = 0.33, use_conv = FALSE, ...)
x |
The regressor object to evaluate |
grid |
the sampling grid. A vector of real values in seconds. |
... |
Additional arguments passed to specific methods |
precision |
the sampling precision for the hrf. This parameter is passed to |
use_conv |
use fast convolution approach |
A numeric vector or matrix containing the evaluated regressor values
single_trial_regressor()
, regressor()
frame <- sampling_frame(blocklens=100, TR=2)
reg <- regressor(onsets=c(10,12, 14, 16, 18,20,35, 47,52, 68, 79,86), amp=runif(12),
duration=runif(12)*3, hrf=HRF_SPMG1)
e1 = evaluate(reg, samples(frame))
e2 = evaluate(reg, samples(frame), use_conv=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.