Entering edit mode
I am trying to create an array object.
> a = array(NA, c(4,1,1))
> class(a)
[1] "array"
> a[1,1,1] = "test"
> class(a)
[1] "array"
> a[2,1,1] = list(1:5)
> class(a)
[1] "list"
I want the object a to stay as an array after getting a list as the value for a[2,1,1].
How can I do this?
Thank you very much.