ifthen | R Documentation |
ifthen(a, b, c, d, e, f, ...)
== if (a) b else if (c) d else if (e) f
ifthen(...)
... |
pairs of checks and corresponding return values |
ifelse
returns the first value for which the corresponding
statement evaluates to TRUE
x <- 2
y <- 2
z <- 1
ifthen(x == 0, "foo", y == 0, "bar", z == 1, "this string gets returned")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.