| ls_eq_build | R Documentation |
These are a set of really basic functions that facilitate building LimeSurvey Expression Manager (LSEM) equations.
ls_eq_build(lhs, operator, rhs)
ls_eq_is(varCode, value, naok = TRUE)
ls_eq_isChecked(varCode, naok = TRUE)
ls_eq_isUnchecked(varCode, naok = TRUE)
ls_eq_if(cond, ifExpr, elseExpr)
ls_eq_ifRegex(regex, varCode, ifExpr, elseExpr, naok = TRUE)
ls_eq_brace(expr)
ls_eq_quote(expr)
lhs |
The left-hand side expression. |
operator |
The operator. |
rhs |
The right-hand side expression. |
varCode |
A LimeSurvey variable code. |
value |
A value. |
naok |
Whether to append ".NAOK" to the variable code. |
cond |
A condition, for example created by |
ifExpr, elseExpr, expr |
An expression. |
regex |
A regular expression. |
ls_eq_build() just pastes together its three
arguments in the same order using a space as
separator. So it's mostly used for clarity when
building LSEM equations.
ls_eq_is() uses ls_eq_build() to specify a logical
expression that is true when varCode equals value.
ls_eq_if() builds an if/then/else expression; if
cond evaluates to TRUE, the LSEM uses ifExpr;
otherwise, it uses elseExpr.
ls_eq_ifRegex checks a question against a regular expression.
ls_eq_isChecked() and ls_eq_isUnchecked() return an
expression evaluating whether a checkbox is checked (or not).
ls_eq_brace() simply embraces expr, an expression
(i.e. it prepends { and appends }).
ls_eq_quote() simply embraces expr, an expression
(i.e. it prepends ' and appends ').
A character vector.
ls_eq_build("questionCode", "==", "Y");
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.