is this the most straightforward way to convert an array into a data.table?
require(data.table) require(ggplot2) # this returns a data.tabl
convert the data.table back into the original array
Here a quick and dirty solution
DT2 = as.data.table(aaa) aaa2= array(dim = dim(aaa)) invisible(DT2[, aaa2[V1, V2, V3] <<- value, .(V1,V2,V3)]) all.equal(aaa,aaa2) # TRUE