write.xlsx produces empty or incorrectly formatted files if the argument is a matrix instead of a data frame. This is one potential workaround for a (potentially) common mistake in usage. An alternative approach would be to more explicitly enforce the type of the x argument.
Simple example which will silently fail without something like the embedded commit:
write.xlsx produces empty or incorrectly formatted files if the argument is a matrix instead of a data frame. This is one potential workaround for a (potentially) common mistake in usage. An alternative approach would be to more explicitly enforce the type of the
x
argument.Simple example which will silently fail without something like the embedded commit: