if(has_rave_subject("demo/DemoSubject")) {
subject <- as_rave_subject("demo/DemoSubject", strict = FALSE)
repository <- ravecore::prepare_subject_voltage_with_blocks(
subject = subject)
if (interactive()) {
app <- glimpse_voltage_repository_with_blocks(
repository = repository,
initial_block = "008",
epoch = "auditory_onset",
highpass_freq = 0.5
)
print(app)
close(app)
}
}
# ---- Example 2 ---------------------------------------------------
# Construct a filearray
sample_rate <- 100
filearray <- filearray::as_filearray(array(rnorm(50000),
dim = c(10000, 5)))
dimnames(filearray) <- list(
Time = seq_len(10000) / sample_rate,
Electrode = 1:5
)
if(interactive()) {
app <- glimpse_voltage_filearray(filearray = filearray,
sample_rate = sample_rate,
channel_gap = 6)
print(app)
}
Run the code above in your browser using DataLab