FWHM | R Documentation |
Full width at half maximum
FWHM(x, sub_minimum = TRUE)
x |
A time series (numeric) |
sub_minimum |
Logical; should the minimum be subtracted before amplitude normalisation? |
The full width at half maximum of the time series.
Martino, G. et al. Locomotor patterns in cerebellar ataxia. J. Neurophysiol. 112, 2810–2821 (2014).
# Number of users connected to the Internet through a server every minute ts <- datasets::WWWusage # Calculate FWHM ts_FWHM <- FWHM(ts) # Half maximum (for the plots) hm <- min(ts) + (max(ts) - min(ts)) / 2 hm_plot <- ts hm_plot[which(hm_plot > hm)] <- hm hm_plot[which(hm_plot < hm)] <- NA # Plots plot(ts, ty = "l", xlab = "Time", ylab = "Number of users") lines(hm_plot, lwd = 3, col = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.