Description Usage Arguments Details Examples
Tilde is a R's "Primitive Function" that does not evaluate its argument, and
it is normally used to create a formula object as an inner-DSL role.
I hijack this functionality to make an anounymous function.
Double-tilde with a two-dots symbol, ..
, makes an anonymous function
in which two-dots plays a placeholder. If you need two or more arguments,
the placeholde should be ..1
, ..2
, and so on. See examples.
Single tilde works as if it is normaly used but it takes a bit calulation
process, and not fully tested.
1 2 3 | "~~"(...)
"~"(e1, e2)
|
... |
any valid expression |
e1, e2 |
The original-tilde is both unary and binary function.
if |
Unsupported nested lambda.
function(x) function(y) x + y
cannot define by double-tilde.
Use f.
and type this; f.(x, f.(y, x + y))
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.