Description Arguments Value Usage Details Author(s) Examples
These functions quickly test whether data within an object has bad values or if the object is defined (i.e. not null) but has no data.
x |
An object containing the data to test |
Logical values that indicate whether the test was successful or not. For matrices and data.frames, a matrix of logical values will be returned.
is.empty(x) is.empty(x)
is.bad(x)
Depending on the type of an object, knowing whether an object contains a valid value or not is different. These functions unify the interfaces across different data types quickly indicating whether an object contains bad values and also whether an object has a value set.
For example, a data.frame may be initialized with no data. This results in an object that is non-null but also unusable. Instead of checking whether something is both non-null and has positive length, just check is.bad().
If you know that an object is non-null, then you can call is.empty() which is a shortcut for checking the length of an object.
Brian Lee Yung Rowe
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.