# NOT RUN {
data(dams_sample)
# only four ndividuals for the sake of the example
dt <- dams_sample[xmv(region_id) %in% c(1, 7, 21, 31)]
per_dt_xs <- periodogram(activity, dt, FUN = chi_sq_periodogram)
per_dt_xs_with_peaks <- find_peaks(per_dt_xs)
per_dt_xs_with_peaks[peak == 1]
# }
Run the code above in your browser using DataLab