Skip to content

zzz_roxygen_exports.R` — a bootstrap file that uses roxygen #5

@eeholmes-uw

Description

@eeholmes-uw

Context

The MARSS package is migrating from hand-written Rd files in man/ to roxygen2 #' headers in R/. Running devtools::document() with partial conversion would generate an incomplete NAMESPACE, breaking the package.

Solution: Create R/zzz_roxygen_exports.R — a bootstrap file that uses roxygen @rawNamespace directives to mirror the entire current hand-written NAMESPACE. As each subsequent issue converts an R file and adds its own @export, the matching lines are removed from this file. When all files are converted, this file is deleted.

Task

Create R/zzz_roxygen_exports.R with exactly the following content:

## Bootstrap file for the roxygen2 Rd-to-roxygen migration.
## As each R file gains its own @export/@importFrom etc., remove
## the corresponding line(s) here. Delete this file when all
## R files have been fully converted.

#' @rawNamespace export(accuracy)
#' @rawNamespace export(autoplot.marssMLE)
#' @rawNamespace export(autoplot.marssPredict)
#' @rawNamespace export(CSEGriskfigure)
#' @rawNamespace export(CSEGtmufigure)
#' @rawNamespace export(forecast)
#' @rawNamespace export(glance)
#' @rawNamespace export(MARSS)
#' @rawNamespace export(MARSSaic)
#' @rawNamespace export(MARSSboot)
#' @rawNamespace export(MARSShessian)
#' @rawNamespace export(MARSSinfo)
#' @rawNamespace export(MARSSinits)
#' @rawNamespace export(MARSSinnovationsboot)
#' @rawNamespace export(MARSSkem)
#' @rawNamespace export(MARSSkemcheck)
#' @rawNamespace export(MARSSkf)
#' @rawNamespace export(MARSShatyt)
#' @rawNamespace export(MARSSkfss)
#' @rawNamespace export(MARSSkfas)
#' @rawNamespace export(MARSSoptim)
#' @rawNamespace export(MARSSparamCIs)
#' @rawNamespace export(MARSSresiduals)
#' @rawNamespace export(MARSSsimulate)
#' @rawNamespace export(MARSSFisherI)
#' @rawNamespace export(MARSSvectorizeparam)
#' @rawNamespace export(tidy)
#' @rawNamespace export(zscore)
#' @rawNamespace export(ldiag)
#' @rawNamespace export(MARSSfit)
#' @import stats
#' @import utils
#' @import graphics
#' @importFrom mvtnorm rmvnorm
#' @importFrom nlme fdHess
#' @importFrom KFAS SSModel SSMcustom KFS
#' @importFrom grDevices contourLines
#' @importFrom generics forecast accuracy glance tidy
#' @rawNamespace S3method(MARSSfit, default)
#' @rawNamespace S3method(MARSSfit, kem)
#' @rawNamespace S3method(MARSSfit, BFGS)
#' @rawNamespace S3method(accuracy, marssMLE)
#' @rawNamespace S3method(accuracy, marssPredict)
#' @rawNamespace S3method(coef, marssMLE)
#' @rawNamespace S3method(fitted, marssMLE)
#' @rawNamespace S3method(forecast, marssMLE)
#' @rawNamespace S3method(glance, marssMLE)
#' @rawNamespace S3method(model.frame, marssMODEL)
#' @rawNamespace S3method(model.frame, marssMLE)
#' @rawNamespace S3method(print, marssMODEL)
#' @rawNamespace S3method(print, marssMLE)
#' @rawNamespace S3method(print, marssPredict)
#' @rawNamespace S3method(plot, marssMLE)
#' @rawNamespace S3method(plot, marssPredict)
#' @rawNamespace S3method(plot, marssResiduals)
#' @rawNamespace S3method(stats::predict, marssMLE)
#' @rawNamespace S3method(logLik, marssMLE)
#' @rawNamespace S3method(residuals, marssMLE)
#' @rawNamespace S3method(simulate, marssMLE)
#' @rawNamespace S3method(summary, marssMODEL)
#' @rawNamespace S3method(summary, marssMLE)
#' @rawNamespace S3method(tidy, marssMLE)
#' @rawNamespace S3method(toLatex, marssMODEL)
#' @rawNamespace S3method(toLatex, marssMLE)
#' @rawNamespace S3method(stats::tsSmooth, marssMLE)
#' @rawNamespace if(getRversion() >= "3.6.0") { S3method(ggplot2::autoplot, marssMLE) }
#' @rawNamespace if(getRversion() >= "3.6.0") { S3method(ggplot2::autoplot, marssPredict) }
#' @rawNamespace if(getRversion() >= "3.6.0") { S3method(ggplot2::autoplot, marssResiduals) }
NULL

Note: MARSScv is intentionally absent — R/MARSScv.R already has @export. The hand-written NAMESPACE is kept as-is throughout this migration; devtools::document() is only run to verify that the bootstrap produces an equivalent result.

Verification

  1. Keep the existing hand-written NAMESPACE in place — do not delete it yet.
  2. Run devtools::document() on a copy or inspect the generated NAMESPACE to confirm it matches the hand-written one.
  3. Run devtools::check() to confirm the package still builds and passes checks.
  4. Commit R/zzz_roxygen_exports.R.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions