Tests if an object is single (i.e. of length 1)

is_single(x)

Arguments

x

an R object

Examples

is_single("hoskdflksfd")  # TRUE
#> [1] TRUE
is_single("1.0")  # TRUE
#> [1] TRUE
is_single(1:5)  # FALSE
#> [1] FALSE
is_single(matrix(runif(4), 2, 2))  # FALSE
#> [1] FALSE