Description Usage Arguments Value Examples
Tests if a value or object does not exist, is length 0, NULL, or NA and returns FALSE if it is, otherwise returns TRUE. Useful for conditional evaluation of a valid value for an object for further calculations or functions.
1 | go(x, env = parent.frame())
|
x |
|
env |
|
(boolean)
A TRUE indicates the object exists, is not NULL, NA or length 0. Otherwise false.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | x <- {4/0}
go("x")
# Infinite is an acceptable value
x <- NaN
go("x")
x <- NA
go("x")
x <- NULL
go("x")
x <- numeric(0)
go("x")
x <- list()
x$go <- 2
go("x$go")
go("x[['go']]")
go(x[['go']])
df <- data.frame(a = c(1,2), b = c(3,4))
go("df[2,'a']")
df[2,'a'] <- NA
x$df <- df
go("x[['df']][2, 'a']")
go("x[['df']][2, 'b']")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.