Learn R Programming

BigDataStatMeth (version 2.0.3)

is_open: Check if HDF5Matrix is open

Description

Check whether an HDF5Matrix object is still valid and open.

Usage

is_open(x)

Value

Logical. TRUE if object is valid and open, FALSE otherwise.

Arguments

x

An HDF5Matrix object

Examples

Run this code
# \donttest{
tmp <- tempfile(fileext = ".h5")

X  <- hdf5_create_matrix(tmp, "data/matrix", data = matrix(rnorm(100), 10, 10))

X <- hdf5_matrix(tmp, "data/matrix")
is_open(X)  # TRUE

close(X)
is_open(X)  # FALSE

unlink(tmp)
# }

Run the code above in your browser using DataLab