Does the input contain elements that are all atomic?

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

Arguments

x

Object.

.xname

Name of object defined in x. Not intended to be used directly.

Value

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

Note

Updated 2019-08-10.

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: 'data.frame()' has length 0.
allAreAtomic(list(a = "x", b = list()))
#> [1] FALSE #> Cause: Not all elements in 'list(a = "x", b = list())' are atomic.