R.matlab
R.matlab copied to clipboard
Problem with 3D array [when using writeMat()]
Hi there.
I'm trying to export a structure (i.e. list) from R to a .mat file. Lets look at the following code.
C <- array(rnorm(18), dim=c(2,3,3))
# This works
filename <- paste(tempfile(), ".mat", sep="")
R.matlab::writeMat(filename, C = C)
# This does not work, we loose dimension
struct = list(C = C)
R.matlab::writeMat(filename, struct = struct)
Is there any easy fix to that?
Cheers,
Philippe