Add tidiers for stats::decompose and stats::stl #165
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
This PR adds an
augment
s3 method for R's two built-in seasonal decompositions. It does not addtidy
orglance
support, since neither of these methods produce model output, per se.The
augment
method struck me as a good for turning the output of these decompositions into something that can be added back to the data. So, for example (using thedatasets::nottem
time series):The Roxygen documentation contains the above example (demonstrating basic usage) and a much longer one for visualising both types of decomposition using ggplot2. I don't know what the policy is on including these larger examples, but I'm happy to amend this one to fit the style of the project.
Similarly, I don't know what the policy is on adding test for new tidiers, but again I'm happy to write them.