Learn R Programming

pracma (version 1.7.9)

isempty: isempty Property

Description

Determine if an object is empty.

Usage

isempty(x)

Arguments

x
an R object

Value

  • TRUE if x has length 0; otherwise, FALSE.

Details

An empty object has length zero.

Examples

Run this code
isempty(c(0))            # FALSE
isempty(matrix(0, 1, 0)) # TRUE

Run the code above in your browser using DataLab