Custom print and plot methods for sampling_frame objects (from fmrihrf).
The print method provides a concise summary focused on runs/blocks, TR and
total scans without mentioning lower-level evaluation precision. The plot
method visualizes runs over time.
Arguments
- x
A
sampling_frameobject created byfmrihrf::sampling_frame().- ...
Unused.
- style
Plot style for
plot(). One of"timeline"(default) or"grid"."timeline"draws a horizontal bar per run;"grid"shows a scan grid by run.- show_ticks
Logical; for
plot(), whether to show per-TR tick marks along each run (timeline style only). DefaultFALSE.- tick_every
Integer; draw a tick every
tick_everyTRs whenshow_ticks = TRUE. Default5.
Examples
sf <- fmrihrf::sampling_frame(blocklens = c(60, 120), TR = 2)
print(sf)
#> Sampling frame
#> - Blocks: 2
#> - Scans: 180 (per block: 60, 120 )
#> - TR: 2 s
#> - Duration: 359 s
plot(sf)
#> Warning: ‘-’ not meaningful for factors
#> Warning: reverse transformation introduced infinite values.
#> Warning: ‘-’ not meaningful for factors
#> Warning: reverse transformation introduced infinite values.
#> Warning: Position guide is perpendicular to the intended axis.
#> ℹ Did you mean to specify a different guide `position`?
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_segment()`).