Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone have experience opening hdf files in R (Windows OS)?

Tags:

windows

r

hdf5

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.

like image 835
Marc in the box Avatar asked Feb 04 '13 13:02

Marc in the box


People also ask

How do I open an HDF file in R?

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() .

How to open HD5 file in R?

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.


1 Answers

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")
like image 90
Martin Morgan Avatar answered Sep 19 '22 16:09

Martin Morgan