file <- tempfile(fileext = ".h5")
h5_write(1L, file, "int32_val", as = "int32")
h5_typeof(file, "int32_val") # "int32"
h5_write(mtcars, file, "mtcars")
h5_typeof(file, "mtcars") # "compound[11]"
h5_write(c("a", "b", "c"), file, "strings")
h5_typeof(file, "strings") # "utf8[1]"
unlink(file)
Run the code above in your browser using DataLab