The openair documentation has a lot of repetition/redundancy baked into it, so I've tried to streamline it using more modern roxygen2 and lessons from openairmaps. Including:
Activate markdown syntax and use it where possible.
Use the "family" tag to group together functions. There are six families I've defined. This automates "seeAlso" (which was inconsistent between functions) and simplifies _pgdown.yml.
Polar Directional Analysis
Trends and Time Series
Trajectory Analysis
Import Functions
Model Evaluation
Cluster Analysis (polarCluster, trajCluster, timeProp - all overlap with other families)
Use the "inheritParam" tag to avoid repetition and improve consistency. For example, most functions have near-identical "pollution" arguments. Where it makes sense, functions now inherit from a parent function. These are:
polarDiff, polarCluster, Annulus, Percentile, Freq inherit from polarPlot
trajLevel and trajCluster inherit from trajPlot
importSAQN et al. now inherit from importAURN, allowing them to have their own "site" param descriptions
conditionalEval inherits from conditionalQuantile
pollutionRose inherits from windRose. This means that the documentation can be more bespoke for each and less confusing (no more "for pollutionrose x, for windrose y").
Used the openair-package.Rd documentation to define the openair class, and then directed all "return" tags to that documentation. Avoids having a three-paragraph description of a list in every single function.
Where appropriate, used inheritDotParams to make the "..." documentation more descriptive.
Refactored the documentation for mydata, which used outdated syntax and caused the .Rd file to look weird.
Collected function imports using usethis::use_import_from() so they weren't dotted around random .R files.
Removed all instances of data(mydata) which hasn't been needed for a while!
Various other little fixes to finish half-finished documentation or notes-to-self that never should have been exported
The openair documentation has a lot of repetition/redundancy baked into it, so I've tried to streamline it using more modern roxygen2 and lessons from
openairmaps
. Including:openair
class, and then directed all "return" tags to that documentation. Avoids having a three-paragraph description of a list in every single function.inheritDotParams
to make the "..." documentation more descriptive.mydata
, which used outdated syntax and caused the .Rd file to look weird.usethis::use_import_from()
so they weren't dotted around random .R files.data(mydata)
which hasn't been needed for a while!Should pass R CMD check.