library(matter)
x <- matter_mat(nrow = 5L, ncol = 2L, datamode = "integer")
# Works despite no `data` being supplied (I think because default values are filled in)
x[]
# Can update `x`
x[] <- matrix(1:10, ncol = 2)
paths <- tempfile(fileext = ".bin")
file.create(paths)
y <- matter_mat(nrow = 5L, ncol = 2L, paths = paths)
# Hangs because no data is created (I think because no default values are filled in)
y[]
y[] <- matrix(1:10, ncol = 2)
Hi Kyle,
This is a corner case, but it'd be nice if it resulted in an error rather than hanging the R session (similar to your suggestion in https://github.com/kuwisdelu/matter/issues/2#issuecomment-309103850)
Thanks, Pete