Why melt() converts dimension names from small to capital letters? How can that be avoided? See example below. Thanks!
library(data.table)
# an array which dimnames are mixed numeric and characters (e.g. "inf")
ax <- array(round(rnorm(12)), dim = c(3,4), dimnames = list(y = c(0,1,"inf"), x = letters[4:7]))
# melt converts "inf" to "Inf"
dt <- setDT(melt(ax))
> head(dt)
y x value
1 0 d 0
2 1 d -1
3 Inf d 1
4 0 e 0
5 1 e 2
6 Inf e -1