Description Usage Arguments Details Value Examples
(ba) Numeric values are accepted as easyp expressions. Length(eas)
can be greater than one, in that case a matrix comprising as many
columns will be returned. Rounding and transformation are options.
The code where Bugs code is constructed is not yet available.
1 | easyp2code2(eas, transfo=TRUE, bugs=FALSE)
|
eas |
either a numeric or a rebastaba expression (character). Its length can be greater than one for repeated standard scalar distributions or vector parameters of other distributions. |
transfo |
( |
bugs |
( |
In rebastaba perspective, this function must be called to define the
parameters of the standard nodes like "normal", "Bernoulli",
"multinomial" and so on... But the analysis of the different types of
parents is supposed to be already done, and eas
accordingly
prepared. For instance repeated parents are already expanded.
For
each component it is determined if the expression is vectorial when
not a repetition of nrow(X)
is added as well as a
cbind
. When more than one component, a nesting cbind
is
added to produce a matrix. Vectorial components are identified with
the first two rows of rbsb.cpt
matrix, respectively variable
name (with the special case of rbsb.cni
) and rounding
transformation.
An interpretable character string to be included when generating code (see the following examples).
1 2 3 4 5 6 7 8 9 10 | rebastaba3k("RESET"); # To comply the R checking
easyp2code2(1234) # "{cbind(rep(1234, nrow(X)))}"
easyp2code2("1234") # "{cbind(rep(1234, nrow(X)))}"
easyp2code2("2*pi") # "{cbind(rep(2*pi, nrow(X)))}"
easyp2code2("1+sqrt({{A}})") # "{1 + sqrt(X[, 'A'])}"
easyp2code2("{{*Y*}}+1") # "{Y+1}"
easyp2code2(11:12) # "{cbind(rep(11, nrow(X)), rep(12, nrow(X)))}"
easyp2code2("(|2|)") # "{round(Y, 2)}"
easyp2code2(c("{{A}}", "(|2|)")) # "{cbind(X[, 'A'], round(Y, 2))}"
easyp2code2("{{POPU[wgt]}}*10000/{{POPU[hgt]}}^2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.