h5_is_group: Check if an HDF5 Object is a Group

h5_is_groupR Documentation

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)

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)

Value

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

See Also

h5_is_dataset(), h5_exists()

Examples

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)

h5lite documentation built on May 19, 2026, 1:07 a.m.