tidy.spec {broom} | R Documentation |
Given a "spec" object, which shows a spectrum across a range of frequencies, returns a tidy data frame with two columns: "freq" and "spec"
## S3 method for class 'spec' tidy(x, ...)
x |
an object of class "spec" |
... |
extra arguments (not used) |
a data frame with "freq" and "spec" columns
spc <- spectrum(lh) tidy(spc) library(ggplot2) ggplot(tidy(spc), aes(freq, spec)) + geom_line()