Displaying 1 result from an estimated 1 matches for "my_matrix_object1".
2008 Jan 08
1
storing matrices in a list or vector and preserve dimensions
...I would like to preserve the dimensions
of the matrices.
Is there any function in R which allows me to store a _fully preserved_
object inside a list() or vector() structure?
thanks in advance,
Bram Kuijper
PS: this is what I do:
# two matrices, which are my objects to be put in the list
my_matrix_object1 <- matrix(data=rep(1,times=9),nrow=3,ncol=3);
my_matrix_object2 <- matrix(data=rep(0,times=9),nrow=3,ncol=3);
my_list <- list()
# note that I explicitly want to append the object to the list
# instead of directly inserting it from the beginning
# (e.g., code to be used in a for-loop)
my_l...