rio.hdf-package: NetCDF and HDF Extensions for 'rio'

Description Examples

Description

This package uses the extension mechanism of the rio package to enable import from and export to HDF and NetCDF files. The only functions to know are import and export.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if (require("rio")) {
  require("datasets")

  # NetCDF
  ## export
  export(mtcars, "example.nc", table = "mtcars")
  # import
  import("example.nc", table = "mtcars")
  
  # HDF5
  ## export
  export(mtcars, "example.h5", table = "mtcars")
  # import
  import("example.h5", table = "mtcars")
  
  unlink("example.nc")
}

leeper/rio.hdf documentation built on May 21, 2019, 12:38 a.m.