Calculate and return an interpolated scalpmap from a data.frame
or
eeg_epochs
object. This provides the basis for a raster plot, as used to
create topographical plots.
get_scalpmap(data, ...)
# S3 method for data.frame
get_scalpmap(
data,
method = "biharmonic",
grid_res = 100,
interp_limit = "skirt",
quantity = "amplitude",
facets = NULL,
r = 95,
k = -1,
...
)
# S3 method for eeg_epochs
get_scalpmap(
data,
method = "biharmonic",
grid_res = 100,
interp_limit = "skirt",
quantity = "amplitude",
facets = NULL,
r = 95,
...
)
An object of class 'data.frame`
Other arguments
"biharmonic" or "gam" smooth
Grid resolution
Interpolate up to the "head" or add a "skirt"
Quantity to be plotted. Defaults to "amplitude".
Any facets you plan to use
Size of headshape
Degrees of freedom used for spline when using method = gam
.
Defaults to -1, which attempts to automatically determine k.
A tibble
with the columns x
, y
, fill
data.frame
: Get scalpmap from a data.frame
eeg_epochs
: Get scalpmap from an eeg_epochs
object.
head(get_scalpmap(demo_epochs))
#> Joining, by = "electrode"
#> # A tibble: 6 x 3
#> x y fill
#> <dbl> <dbl> <dbl>
#> 1 -113. -9.60 5.77
#> 2 -113. -5.76 5.54
#> 3 -113. -1.92 5.33
#> 4 -113. 1.92 5.14
#> 5 -113. 5.76 4.96
#> 6 -113. 9.60 4.81