Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


exams.forge (version 1.0.10)

equations: Equations and Variables

Description

equations defines a set of equations using the formula interface including a LaTeX representation of the formulae.

variables sets the variable values, the LaTeX representation and the solution interval. The first argument must be the equations object. A named parameter starts the setting for a specific variable, e.g. ..., s=1, pos(5), "s^2",... sets for the variable s first its numerical value, second the solution interval and finally the LaTeX representation.

Usage

equations(...)

variables(...)

Value

(for equations) An equations object.

(for variables) The modified equations object.

Arguments

...

For equations, an even number of parameters: formula, LaTeX representation, formula, LaTeX representation, etc.

For variables, parameters to set one or more variables.

Examples

Run this code
# The equations describe the formulae for an confidence interval of the mean
e <- equations(o~x+c*s/sqrt(n), "v_o=\\bar{x}+c\\cdot\\frac{s^2}{n}", 
               u~x-c*s/sqrt(n), "v_u=\\bar{x}-c\\cdot\\frac{s^2}{n}", 
               e~c*s/sqrt(n),   "e  =c\\cdot\\frac{s^2}{\\sqrt{n}}",
               l~2*e,           "l  =2\\cdot e"                   
               )
print(e)
e <- variables(e, 
               x=0,    "\\bar{x}",
               c=2.58, dbl(2), 
               s=1,    pos(5), "s^2",
               n=25,   pos(5),
               l=pos(5), 
               e=pos(5),
               u="v_u", o="v_o")
print(e)

Run the code above in your browser using DataLab