periodogram(data,CTMM=NULL,T=NULL,dt=NULL,res=1,fast=NULL)
## S3 method for class 'periodogram':
plot(x,diagnostic=FALSE,col="black",transparency=0.25,...)telemetry data object of the 2D timeseries data.ctmm model object for specifying the mean.periodogram.plot.periodogram) which is a dataframe containing the frequency, f and the Lomb-Scargle periodogram at that frequency, LSP.dt is specified, the median sampling interval is used. This is typically a good assumption for most data, even when there are gaps and this choice corresponds to the discrete Fourier transform (DFT) periodogram for evenly-sampled data. If no T is specified, the full sampling period is used.
The frequency grid interval is finally given by 1/(2*(T+dt)*res) and the frequency cutoff is given by 1/(2*dt), both in accordance with the DFT periodogram. Increasing res beyond res=1 will make for a smooth periodogram, but sequential frequencies will be highly correlated.
If a ctmm argument is provided, the ML mean will be detrended from the data prior to calculating the periodogram. Otherwise, the sample mean will be detrended.#Load package and data
library(ctmm)
data(buffalo)
#Extract movement data for a single animal
cilla <- buffalo[[1]]
#Calculate periodogram (fast=TRUE for example)
lsp <- periodogram(cilla,fast=TRUE)
#Plot the periodogram
plot(lsp)Run the code above in your browser using DataLab