I think the problem comes from melt
applying type.convert
to the dim names of your data. To avoid character to numeric conversion, you can replace the .
by a -
. Try:
dimnames(fedfire8004$acres)$month <- sub("\\.", "-",
dimnames(fedfire8004$acres)$month)
Then apply melt
again and you should see 1980-1
and 1980-10
.