Update h5MEMDF.r

Removed sapply which was producing unpredictable return types