isempty: Is Array Empty?

View source: R/isempty.R

isemptyR Documentation

Is Array Empty?

Description

Determine whether array is empty. An empty array, table, or timetable has at least one dimension with length 0, such as 0-by-0 or 0-by-5.

Usage

isempty(x)

Arguments

x

array

Details

Emulates the behavior of the isempty function on Matlab

Value

A logical value determining if x is empty

Examples

isempty(array(dim = c(0, 2, 2)))
isempty(matrix(rep(NA, 4), 2))
isempty(matrix(rep(0, 4), 2))
isempty(as.factor(c(NA, NA)))
isempty(factor())
isempty(matrix(rep("", 3)))

matlab2r documentation built on Feb. 16, 2023, 10:39 p.m.

Related to isempty in matlab2r...