Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhandsontable throws error when either rows or columns has length zero #409

Open
pepijn-devries opened this issue Jun 12, 2022 · 1 comment

Comments

@pepijn-devries
Copy link

Thanks for bringing handsontable to R!

When feeding a matrix where either rows or columns has length zero to rhandsontable, an error is thrown:

rhandsontable(matrix(numeric(), nrow = 10, ncol = 0))

Can this be fixed? Or when this is expected behaviour, please add so to the documentation.

@pepijn-devries
Copy link
Author

As a work-around, I've found the following solution:

rhandsontable(as.data.frame(matrix(numeric(), nrow = 10, ncol = 0)))

Not sure why converting the matrix to a data.frame fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant