Skip to content

Documentation request: Formulas on the website #507

@Gero1999

Description

@Gero1999

I was wondering if it would be nice to include within the defining functions for a parameter an optional argument formula that expresses in LaTeX format the mathematical equation used for a calculation:

pk.calc.cmax <- function(conc, check=TRUE) {
  if (check) {
    assert_conc(conc = conc)
  }
  if (length(conc) == 0 | all(is.na(conc))) {
    NA
  } else {
    max(conc, na.rm=TRUE)
  }
}
# Add the column to the interval specification
add.interval.col("cmax",
                 FUN="pk.calc.cmax",
                 values=c(FALSE, TRUE),
                 unit_type="conc",
                 pretty_name="Cmax",
                 desc="Maximum observed concentration",
                 depends=NULL)
PKNCA.set.summary(
  name="cmax",
  description="geometric mean and geometric coefficient of variation",
  point=business.geomean,
  spread=business.geocv
)

it would be something like this:

pretty_formula <- "$$C_{\\max} = \\max_{i = 1,\\dots,n} C(t_i)$$"

and then be used to be render them to a PKNCA website page. That way we would have one webpage with automatically all the in-package parameters and their formulas.

We might probably want to do it anyway in aNCA, but I think it might make more sense to develop it directly here. How does this sound?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions