Displaying 1 result from an estimated 1 matches for "myarr".
Did you mean:
marr
2012 Jun 04
2
Convert 2-dim array to 3-dim array
Hello R-users,
I'd like to load data from a CSV-file to a 3-dimensional array. However
the default seems to be 2-dimensional. It would also be ok to load the
data and then convert it to a 3-dimensional structure.
I've been trying:
dat = read.csv(filename)
myArr = as.array(dat, dim = c(12,100,3))
However, I get an error message:
Error in `dimnames<-.data.frame`(`*tmp*`, value = list(n)) :
invalid 'dimnames' given for data frame
And I don't know how how to set the dimnames.
I would appreciate any help!
Best Wishes
Dave
[[alternative H...