Format column of double to scientific notation
Awesome package! I have a question.
Is it possible to format a column of double to scientific notation in reachable parameters? I am looking for something like this:
reachable(data, columns = list(
dbl_column = colDef(format = colFormat(scientific = TRUE, digit = 3)
)
)
The reason that I am not using format(scientific = TRUE) before passing it to reactable is because format(scientific = TRUE) converts my numbers to strings which I think fails reactable's build-in sort functionality.
thank you.
Hi, scientific notation isn't supported by the built-in column formatters, but I think it's common enough that it'd make sense as a feature request.
For now, you can use a custom render function to implement your own custom formatter. If you do the formatting with a custom render function instead of modifying the data passed into reactable(), cells will appear formatted, but still be sorted on the original underlying data.