Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies across models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.
# S3 method for spec tidy(x, ...)
x | A |
---|---|
... | Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in |
A tibble::tibble()
with columns:
Vector of frequencies at which the spectral density is estimated.
Vector (for univariate series) or matrix (for multivariate series) of estimates of the spectral density at frequencies corresponding to freq.
spc <- spectrum(lh) tidy(spc) #> # A tibble: 24 × 2 #> freq spec #> <dbl> <dbl> #> 1 0.0208 0.0912 #> 2 0.0417 0.331 #> 3 0.0625 0.836 #> 4 0.0833 1.17 #> 5 0.104 0.350 #> 6 0.125 1.51 #> 7 0.146 0.328 #> 8 0.167 0.618 #> 9 0.188 0.320 #> 10 0.208 0.0675 #> # … with 14 more rows library(ggplot2) ggplot(tidy(spc), aes(freq, spec)) + geom_line()