ggspectro | R Documentation |
This function summarises spectrogram data (containing spectrograms of multiple individual),
to show period on the y
axis, time on the x
axis and power on the z
axis (e.g. as a colour).
ggspectro(data, mapping = aes(), summary_FUN = mean, summary_time_window = mins(30), time_wrap = NULL, time_offset = 0, ...)
data |
behavr::behavr table containing the data and metadata |
mapping |
default list of aesthetic mappings to use for plot |
summary_FUN |
method (function) used to summarise |
summary_time_window |
width (in seconds) of the time window to compute a summary on |
time_wrap |
time (in seconds) used to wrap the data (see details) |
time_offset |
time offset (i.e. phase, in seconds) when using |
... |
additional arguments to be passed to |
library(zeitgebr) data(dams_sample) dt <- dams_sample spect_dt <- spectrogram(activity, dt) pl <- ggspectro(spect_dt,time_wrap = hours(24)) + stat_tile_etho() + scale_y_hours(log=T) + stat_ld_annotations(ld_colours = c("grey","black")) pl + facet_grid(period_group ~ .) pl + facet_wrap(~ id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.