I am unable to work with hdf files in R. I believe the R package hdf5
would be what I need to work with these files, but am having difficulty installing it. I get the following warning:
> install.packages("hdf5")
Installing package(s) into ‘C:/Users/ME/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
package ‘hdf5’ is available as a source package but not as a binary
Warning message:
package ‘hdf5’ is not available (for R version 2.15.2)
Does anyone have experience setting up a Windows OS version of R to read and work with hdf files? An example of an hdf file that I am hoping to work with can be found here.
To use R hdf5r package, the first step is to include the package. To open a NASA HDF file, use h5file() with path to the file name. To list available datasets in HDF5 file, type the assigned variable name. To retrieve data from dataset in a group, use readDataSet() .
To access HDF5 files in R, we will use the rhdf5 library which is part of the Bioconductor suite of R libraries. It might also be useful to install the free HDF5 viewer which will allow you to explore the contents of an HDF5 file using a graphic interface.
The Bioconductor rhdf5 package is available on all platforms and does not have system dependencies.
source("http://bioconductor.org/biocLite.R")
biocLite("rhdf5")
and then each session
library("rhdf5")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With