When coercing from a data.table to a matrix and types are coerced (yes this is bad and shouldn't be done, so this is definitely low-priority), a data.table inserts spaces whereas a data.frame does not:
> as.matrix(data.frame(a = LETTERS[1:2], b = c(FALSE, TRUE)))
a b
[1,] "A" "FALSE"
[2,] "B" "TRUE"
> as.matrix(data.table(a = LETTERS[1:2], b = c(FALSE, TRUE)))
a b
[1,] "A" "FALSE"
[2,] "B" " TRUE"
I assume this is a result of C++ typing somehow, but I don't know enough to make a PR, sorry.