r-quantities / errors

Uncertainty Propagation for R Vectors
https://r-quantities.github.io/errors
Other
48 stars 8 forks source link

The errors will be removed/striped when using melt() and dcast(). #46

Closed yu-soong closed 3 years ago

yu-soong commented 3 years ago

The errors will be removed after melt() or dcast(), no matter it is reshape2::melt() or melt.data.table().

By the way, It seems the errors package works well in data.table, not for the melt() and dcast() functions though. So make it work for the function melt() would be great!

Enchufa2 commented 3 years ago

No, it doesn't work with data.table. To achieve maximum performance, data.table has its own code to wrangle data, and thus it doesn't call the methods that this package provides for errors objects. Therefore, it's not in our hand to make it work. I suggest to use base R methods to work with errors, units or quantities objects. There is some support for dplyr too thanks to vctrs, but it's not 100%.

yu-soong commented 3 years ago

Ok then I'll use dplyr with errors. Thanks