# \donttest{
# Create a temporary CSV file to import
csv_file <- tempfile(fileext = ".csv")
hdf5_file <- tempfile(fileext = ".h5")
# Write sample data
data <- matrix(rnorm(50), nrow = 10, ncol = 5)
write.table(data, csv_file, sep = ",", row.names = FALSE, col.names = TRUE)
# Import CSV to HDF5
bdImportData_hdf5(
inFile = csv_file,
destFile = hdf5_file,
destGroup = "mydata",
destDataset = "matrix1",
header = TRUE,
sep = ","
)
hdf5_close_all()
unlink(c(csv_file, hdf5_file))
# }
Run the code above in your browser using DataLab