View source: R/findFunctionDefs.R
getIfCond | R Documentation |
if
language objectsTypically, these are not needed as the user/programmer
knows the structure of the if
language objects.
They hide the details when introducing meta-programming.
isIfFalse
determines whether the condition is
a literal FALSE
value and so the
code within the if
body will never be evaluated.
getIfCond(code)
getIfTrue(code)
getIfFalse(code)
code |
the R language object |
The relevant language objects.
Duncan Temple Lang
findCallsTo
e = quote(if(all(x < 0)) {
sum(log(abs(x)))
} else if(any(x == 0)) {
x[ x == 0 ] = rnorm(sum(x == 0), sd = 0.001)
} else {
sum(log(x))
})
getIfCond(e)
fa = getIfFalse(e)
getIfCond(fa)
getIfTrue(fa)
getIfFalse(fa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.