szcf-weiya/LaTeXTables.jl

`print2tex` does not work with matrices which contains `missing`s

Closed this issue · 3 comments

This line
tests whether the item is a vector or a number. However, if a matrix contains missings, since there is no method length defined for missings, it cannot be executed.

If you want to test whether it is a Number, maybe use x isa Number?
Thank you!

Thanks! Do you have any suggestions for the missing values? I plan to add an argument to assign the missing entries, maybe just missing or NA.

Hi @szcf-weiya, sorry for the late reply. I was pretty busy. I think maybe we just use missings instead of NaN? Because NaN is always a floating point number in Julia while missing is of its own type. Here's the explanation from GPT-4:

`missing` and `NaN` are not equivalent in Julia.

`NaN` stands for "Not a Number" and is used to represent undefined or unrepresentable numerical results such as the result of 0/0. It's a special floating-point value.

`missing`, on the other hand, is used to represent missing or unknown values in data. It can be used with any type of data, not just numerical data.

So while they might be used in similar ways to represent "absence" of a value, they have different uses and are not the same.

Sorry for the late reply, I was also busy recently.

It has been implemented in the above commit, and the new version v0.1.4 will be released.