# \donttest{
hdf5_file <- tempfile(fileext = ".h5")
csv_file <- tempfile(fileext = ".csv")
# Create a test CSV file
data <- matrix(rnorm(100), 10, 10)
write.csv(data, csv_file, row.names = FALSE)
# Import to HDF5
bdImportTextFile_hdf5(
filename = csv_file,
outputfile = hdf5_file,
outGroup = "data",
outDataset = "matrix1",
sep = ",",
header = TRUE,
overwriteFile = TRUE
)
# Cleanup
unlink(c(csv_file, hdf5_file))
# }
Run the code above in your browser using DataLab