tidy.spec {broom}R Documentation

tidy a spec objet

Description

Given a "spec" object, which shows a spectrum across a range of frequencies, returns a tidy data frame with two columns: "freq" and "spec"

Usage

## S3 method for class 'spec'
tidy(x, ...)

Arguments

x

an object of class "spec"

...

extra arguments (not used)

Value

a data frame with "freq" and "spec" columns

Examples


spc <- spectrum(lh)
tidy(spc)

library(ggplot2)
ggplot(tidy(spc), aes(freq, spec)) + geom_line()


[Package broom version 0.4.2 Index]