lsumprod {exams.forge} | R Documentation |
Supporting Functions for Math LaTeX Output
Description
lsumprod
creates a latex printout of \sum_i x_i y_i
with brackets if x_i
or y_i
starts with a -
.
lsum
creates a latex printout of x
as sum.
lprod
creates a latex printout of x
as product.
lvec
creates a latex printout of x
as vector.
lmean
creates a latex printout as \frac{x_1+...+x_n}{n}
.
lvar
creates a latex printout as \frac{(x_1-xbar)^2+...+(x_n-xbar)^2}{n}
.
lbr
creates a latex printout of x
with brackets if x
starts with a -
.
lsgn
creates a latex printout of x
with a plus or minus at the beginning.
Usage
lsumprod(..., br = "(")
lsum(x)
lprod(x)
lvec(
x,
left = c("(", "[", "{", "|", "||", "<", "a", "c", "f"),
right = NULL,
collapse = ", "
)
lmean(x)
lvar(x, mu = NULL, br = "(")
lbr(x, br = c("(", "[", "{", "|", "||", "<", "a", "c", "f"), subset = NULL)
lsgn(x)
latex_sumprod(..., br = "(")
latex_sum(x)
latex_product(x)
latex_mean(x)
latex_var(x, mu = NULL, br = "(")
latex_bracket(
x,
br = c("(", "[", "{", "|", "||", "<", "a", "c", "f"),
subset = NULL
)
latex_pmsign(x)
Arguments
... |
further input values |
br , left , right |
character: which brackets to use. The possibilities are:
|
x |
numeric: input values |
collapse |
character: an optional character string to separate the results (default: ', ') |
mu |
numeric: population mean (default: |
subset |
logical: indicates which elements have brackets added (default: |
Value
A character.
Examples
lsumprod(-2:2, (1:5)/10)
lbr(-2:2)
lsum(-2:2)
lmean(-2:2)
lvec(-2:2)
lvec(-2:2, '[')
lvec(0:1, '(', ']')