jrowen / rhandsontable

A htmlwidgets implementation of Handsontable.js
http://jrowen.github.io/rhandsontable/
Other
383 stars 148 forks source link

Fix rhandsontable() to handle empty datasets when useTypes = FALSE #395

Closed DillonHammill closed 2 years ago

DillonHammill commented 3 years ago

@jrowen, just adding a simple fix to rhandsontable() to ensure that it appropriately handles data that is empty (i.e. all NA values). As this loop was originally written, when the data is empty individual values are returned within the lapply call instead of a vector per column as normally expected. To fix this, I have updated the lapply call to explicitly extract the individual columns to ensure that they are handled correctly. I originally picked up this issue through my DataEditR package issue#34.