Learn R Programming

h5lite (version 2.0.0.2)

h5_is_group: Check if an HDF5 Object is a Group

Description

Checks if the object at a given path is a group.

Usage

h5_is_group(file, name, attr = NULL)

Value

A logical value: TRUE if the object exists and is a group, FALSE otherwise (if it is a dataset, or does not exist).

Arguments

file

The path to the HDF5 file.

name

The full path of the object to check.

attr

The name of an attribute. This parameter is included for consistency with other functions. Since attributes cannot be groups, providing this will always return FALSE. (Default: NULL)

See Also

h5_is_dataset(), h5_exists()

Examples

Run this code
file <- tempfile(fileext = ".h5")

h5_create_group(file, "grp")
h5_is_group(file, "grp") # TRUE

h5_write(1:10, file, "my_ints")
h5_is_group(file, "my_ints") # FALSE

unlink(file)

Run the code above in your browser using DataLab