# \donttest{
csv_file <- tempfile(fileext = ".csv")
hdf5_file <- tempfile(fileext = ".h5")
# Write sample numeric data
write.table(matrix(rnorm(50), nrow = 10, ncol = 5),
csv_file, sep = ",", row.names = FALSE, col.names = TRUE)
# Import CSV to HDF5
mat <- hdf5_import(
source = csv_file,
filename = hdf5_file,
dataset = "raw/data",
sep = ","
)
dim(mat)
hdf5_close_all()
unlink(c(csv_file, hdf5_file))
# }
Run the code above in your browser using DataLab