title: How to test whether a dataset exists in HDF5 file before attempting to open it?
body: <p>I have the following snippet that works OK but generates an unwanted error if the dataset "Test" does not exist in the hdf5 file which is, in fact, a valid case:</p>
  
  <pre><code>library(rhdf5)
  test_data &lt;- h5read('test.h5', 'Test')
  if (exists('test_data')) {
     # then read the data
     df_test &lt;- as.data.frame(t(test_data))
     # work with df_test 
  }
  </code></pre>
  
  <p>and R outputs an error if the dataset does not exist:  </p>
  
  <pre><code> Error in h5read('test.h5', 'Test') : 
     Object Test does not exist in this HDF5 file.
   Execution halted
  </code></pre>
  
  <p>I would like to gracefully handle this without the R process spitting out sporadic errors.</p>