start <- proc.time()
filt_dat <- avg_ref %>%
rowid_to_column("Samp_No") %>%
gather(electrode, amplitude, -Samp_No, -Status) %>%
nest(-electrode) %>%
mutate(filt_amp = map(data, ~simple_filt(.$amplitude))) %>%
unnest()
end <- proc.time()-start
end
filt_dat %>%
dplyr::filter(Samp_No <= 15000 & !(electrode == "EXG7"| electrode == "EXG8")) %>%
group_by(electrode) %>%
mutate(amplitude = amplitude - mean(amplitude)) %>%
ungroup() %>%
gather(filtered, amplitude, filt_amp, amplitude) %>%
ggplot(aes(x = Samp_No, y = amplitude, group = interaction(electrode,filtered), colour = filtered)) + geom_line(alpha = 0.5)
start <- proc.time()
filt_dat <- avg_ref %>%
select(-Status,-EXG7, -EXG8) %>%
simple_filt(., low_cut = 1, srate = 1024)
end <- proc.time()-start
end
start <- proc.time()
filt_dat <- fff %>%
select(Fp1, AF7) %>%
simple_filt(., low_edge = 1, high_edge = 30, srate = 1024)
end <- proc.time()-start
end
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.