grimbough / rhdf5

Package providing an interface between HDF5 and R
http://bioconductor.org/packages/rhdf5
60 stars 21 forks source link

Standardise return types #85

Open grimbough opened 3 years ago

grimbough commented 3 years ago

The return types for many of the H5X are all over the place. In most cases they return the same as the equivalent C function i.e. 0 for success (e.g. H5Aclose) , other times they return TRUE for success (e.g. H5Aexists).

This is compounded by cases where the return type and documentation do not match e.g. h5errorHandling returns NULL under all circumstances, but the docs say "Returns 0 if options are set successfully." This has been reported before in #43

This should be standardised across the package, and the documentation updated to reflect the new style. However it's unknown whether there are many instances where the return types are used by dependent packages. Changing 0 to TRUE will be a breaking change, so care needs to be taken before rolling this out.