R/calculus.R
prod_.Rd
Product of a function
prod_(f, var, lower, upper, doit = TRUE)
Function to take product of
Variable to take product for (either string or caracas_symbol)
caracas_symbol
Lower limit
Upper limit
Evaluate the product immediately (or later with doit())
doit()
if (has_sympy()) { x <- symbol("x") p <- prod_(1/x, "x", 1, 10) p as_expr(p) prod(1/(1:10)) n <- symbol("n") prod_(x, x, 1, n) } #> c: n!