Does the input contain elements that are all atomic?

allAreAtomic(x, .xname = getNameInParent(x))

Arguments

x

Object.

.xname

Not intended to be used directly.

Value

TRUE on success; FALSE on failure, with cause attribute set.

See also

Examples

## TRUE ==== allAreAtomic(data.frame(a = "foo", b = "bar"))
#> [1] TRUE
allAreAtomic(list(a = "foo", b = "bar"))
#> [1] TRUE
## FALSE ==== allAreAtomic(data.frame())
#> [1] FALSE #> Cause of failure: #> data.frame() has length 0.
allAreAtomic(list(a = "x", b = list()))
#> [1] FALSE #> Cause of failure: #> Not all elements in list(a = "x", b = list()) are atomic.