I am just trying to do a basic thing but I can't seem to figure out what the problem is and I can't find answers here that are to problems exactly like mine. If anyone already knows of an answer to this elsewhere, feel free to link that.
I have a simulation that generates a vector, and I have set up my simulation such that it grabs the generate vector and makes it an element of another vector. After I run the simulation multiple times, I would like to make the vector of vectors into a matrix, but it the console output is always this:
> agx1
[1,] Numeric,7
[2,] Numeric,7
My simulation pretty much does the following:
agnx1 = c()
#some stuff happens
agnx1[i] = x1
#iteration number two takes place
agnx1[i+1] = x1
#etc..
#Now say I have
agx1[1] = c(0.796399, 0.865736, 0.885808, 0.896138, 0.896138, 0.850385, NA)
#and
agx1[2] = c(0.796399, 0.856540, 0.881432, 0.900808, 0.900808, 0.857664, NA)
#and therefore, agx1 is a vector of vectors. But whenever I try something like..
cagx1 = cbind(agx1[1:2])
#or
cagx1 = as.matrix(agx1)
# I just get:
[,1]
[1,] Numeric,7
[2,] Numeric,7
Any suggestions would be helpful.