View source: R/hasZeroLength.R
hasZeroLength | R Documentation |
This is just a "shortcut" to "length(x) == 0L"
hasZeroLength(x)
x |
R object that has a length attribute, e.g. vector or list |
TRUE
if length(x) == 0L
, otherwise FALSE
hasZeroLength(character()) # TRUE
hasZeroLength(list()) # TRUE
# Do not confuse, has nothing to do with the length of a string
# here: vector of length one
hasZeroLength("") # FALSE
# Remember that the length of a data frame is the number of its columns
hasZeroLength(data.frame(a = character())) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.