[R] Defining a "list"
bartjoosen at hotmail.com
Wed Oct 15 16:38:15 CEST 2008
result <- list()
for (i in 1:10) result[[i]] <- rnorm(i)
Megh Dal wrote:
> 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.
> result = rnorm(1)
> result = rnorm(2)
> result[n] = rnorm(n)
> What would be the best way to do that?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/Defining-a-%22list%22-tp19991526p19994922.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help