Displaying 2 results from an estimated 2 matches for "22list".
Did you mean:
20list
2009 Jul 05
2
From "list" to "matrix"
..."list", length=3)
for (i in 1:3) vec[[i]] <- matrix(rnorm((i+3)*2), (i+3))
vec
Now I want to change the type of "vec" from list to a matrix with (4+5+6)
rows and 2 columns. How can I do that?
Thanks and regards,
--
View this message in context: http://www.nabble.com/From-%22list%22-to-%22matrix%22-tp24345922p24345922.html
Sent from the R help mailing list archive at Nabble.com.
2008 Oct 15
2
Defining a "list"
Can anyone please tell me how to define a "list". Suppose I want to define a list object "result" with length n then want to fill each place of "result" with different objects. For e.g.
i=1
result[1] = rnorm(1)
i=2
result[2] = rnorm(2)
.......................
i=n
result[n] = rnorm(n)
What would be the best way to do that?
Regards,