Skip to contents

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).

Examples

file <- tempfile(fileext = ".h5")

h5_create_group(file, "grp")
h5_is_group(file, "grp") # TRUE
#> [1] TRUE

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

unlink(file)