From c7a3a6303a6873959d55ba125297f1c09ff10cf7 Mon Sep 17 00:00:00 2001 From: Bill Denney Date: Wed, 7 Aug 2024 23:31:07 -0400 Subject: [PATCH] Update documentation --- DESCRIPTION | 2 +- NAMESPACE | 10 +++++ R/knit_printEquation.R | 10 +++++ man/extract_eq.nlmixr2FitCore.Rd | 75 -------------------------------- 4 files changed, 21 insertions(+), 76 deletions(-) delete mode 100644 man/extract_eq.nlmixr2FitCore.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 74fe1e0..2b085ad 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -59,5 +59,5 @@ Config/testthat/edition: 3 Encoding: UTF-8 NeedsCompilation: yes Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 LazyData: true diff --git a/NAMESPACE b/NAMESPACE index 0c4c784..e54e5ea 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,16 @@ # Generated by roxygen2: do not edit by hand S3method(bootplot,nlmixr2FitCore) +S3method(extractEqHelper,"(") +S3method(extractEqHelper,"function") +S3method(extractEqHelper,"{") +S3method(extractEqHelper,call) +S3method(extractEqHelper,character) +S3method(extractEqHelper,default) +S3method(extractEqHelper,name) +S3method(extractEqHelper,nlmixr2FitCore) +S3method(extractEqHelper,numeric) +S3method(extractEqHelper,rxUi) S3method(knit_print,nlmixr2FitCore) S3method(knit_print,rxUi) S3method(print,nlmixr2BoostrapSummary) diff --git a/R/knit_printEquation.R b/R/knit_printEquation.R index 696d41e..faf8c28 100644 --- a/R/knit_printEquation.R +++ b/R/knit_printEquation.R @@ -69,22 +69,27 @@ extractEqHelperLhsRhs <- function(x, ..., inModel, prefix = "", middle, suffix = paste0(prefix, lhs, middle, rhs, suffix) } +#' @export extractEqHelper.nlmixr2FitCore <- function(x, ..., inModel) { extractEqHelper(as.function(x), ..., inModel=FALSE) } +#' @export extractEqHelper.rxUi <- function(x, ..., inModel, name) { extractEqHelper(as.function(x), ..., inModel=FALSE) } +#' @export extractEqHelper.function <- function(x, ..., inModel, name) { extractEqHelper(methods::functionBody(x), ..., inModel=FALSE) } +#' @export "extractEqHelper.{" <- function(x, ..., inModel, name) { extractEqHelperSeqDrop(x, ..., inModel = inModel) } +#' @export "extractEqHelper.(" <- function(x, ..., inModel, dropParen = FALSE, name) { stopifnot(length(x) == 2) if (dropParen) { @@ -178,6 +183,7 @@ latexOpMap <- "!"="{\\lnot}" ) +#' @export extractEqHelper.call <- function(x, ..., inModel, name) { if (inModel) { if (is.name(x[[1]])) { @@ -270,6 +276,7 @@ extractEqHelper.call <- function(x, ..., inModel, name) { ret } +#' @export extractEqHelper.name <- function(x, ..., inModel, underscoreToSubscript = FALSE, name) { if (inModel) { ret <- as.character(x) @@ -292,6 +299,7 @@ extractEqHelper.name <- function(x, ..., inModel, underscoreToSubscript = FALSE, ret } +#' @export extractEqHelper.numeric <- function(x, ..., inModel, name = NULL) { if (inModel) { ret <- format(x) @@ -329,6 +337,7 @@ escapeLatex <- function (x, newlines = FALSE, spaces = FALSE) { x } +#' @export extractEqHelper.character <- function(x, ..., inModel, name = NULL) { if (inModel) { ret <- sprintf('\\text{"%s"}', escapeLatex(x)) @@ -394,6 +403,7 @@ extractEqHelper.if <- function(x, ..., inModel, alignment, indent = 0L, firstIf ret } +#' @export extractEqHelper.default <- function(x, ..., inModel) { if (inherits(x, "<-") | inherits(x, "=")) { # The assignment classes go via extractEqHelper.default to fix an R CMD diff --git a/man/extract_eq.nlmixr2FitCore.Rd b/man/extract_eq.nlmixr2FitCore.Rd deleted file mode 100644 index 7fbce54..0000000 --- a/man/extract_eq.nlmixr2FitCore.Rd +++ /dev/null @@ -1,75 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/extract_eq.R -\name{extract_eq.nlmixr2FitCore} -\alias{extract_eq.nlmixr2FitCore} -\alias{extract_eq.rxUi} -\title{Extract the equations from an nlmixr2/rxode2 model to produce a 'LaTeX' -equation.} -\usage{ -\method{extract_eq}{nlmixr2FitCore}( - model, - intercept = "alpha", - greek = "beta", - greek_colors = NULL, - subscript_colors = NULL, - var_colors = NULL, - var_subscript_colors = NULL, - raw_tex = FALSE, - swap_var_names = NULL, - swap_subscript_names = NULL, - ital_vars = FALSE, - label = NULL, - index_factors = FALSE, - show_distribution = FALSE, - wrap = FALSE, - terms_per_line = 4, - operator_location = "end", - align_env = "aligned", - use_coefs = FALSE, - coef_digits = 2, - fix_signs = TRUE, - font_size = NULL, - mean_separate, - return_variances = FALSE, - se_subscripts = FALSE, - ... -) - -\method{extract_eq}{rxUi}( - model, - intercept = "alpha", - greek = "beta", - greek_colors = NULL, - subscript_colors = NULL, - var_colors = NULL, - var_subscript_colors = NULL, - raw_tex = FALSE, - swap_var_names = NULL, - swap_subscript_names = NULL, - ital_vars = FALSE, - label = NULL, - index_factors = FALSE, - show_distribution = FALSE, - wrap = FALSE, - terms_per_line = 4, - operator_location = "end", - align_env = "aligned", - use_coefs = FALSE, - coef_digits = 2, - fix_signs = TRUE, - font_size = NULL, - mean_separate, - return_variances = FALSE, - se_subscripts = FALSE, - ... -) -} -\arguments{ -\item{model}{The model to extract equations from} - -\item{intercept, greek, greek_colors, subscript_colors, var_colors, var_subscript_colors, raw_tex, swap_var_names, swap_subscript_names, ital_vars, label, index_factors, show_distribution, wrap, terms_per_line, operator_location, align_env, use_coefs, coef_digits, fix_signs, font_size, mean_separate, return_variances, se_subscripts}{Ignored} -} -\description{ -Extract the equations from an nlmixr2/rxode2 model to produce a 'LaTeX' -equation. -}