R/cummulative.R

Defines functions Int Prod Sum

Documented in Int Prod Sum

Sum <- function(f, from = lsymb(""), to = lsymb("")) {
    lsymb("\\sum") |>
    under(from) |>
    (\(x) x^to)() |>
    (\(x) x * f)()
}

Prod <- function(f, from = lsymb(""), to = lsymb("")) {
    lsymb("\\prod") |>
    under(from) |>
    (\(x) x^to)() |>
    (\(x) x * f)()
}

Int <- function(f, meas = lsymb("dx"), from = lsymb(""), to = lsymb("")) {
    lsymb("\\int") |>
    under(from) |>
    (\(x) x^to)() |>
    (\(x) x * f)() |>
    (\(x) x * "\\," * meas)()
}

Try the latexSymb package in your browser

Any scripts or data that you put into this service are public.

latexSymb documentation built on June 17, 2025, 9:12 a.m.