[R] vector of Vectors
Giovanni Petris
GPetris at uark.edu
Wed Sep 9 19:32:25 CEST 2009
The code below seems to contradict your claim that vectors cannot
contain vectors.
> zz <- vector(mode = "list", length = 3)
> zz
[[1]]
NULL
[[2]]
NULL
[[3]]
NULL
Best,
Giovanni
> Date: Tue, 08 Sep 2009 23:00:54 -0500 (CDT)
> From: sclarke3 at illinois.edu
> Sender: r-help-bounces at r-project.org
> Precedence: list
>
> I just learned that vectors can't contain vectors, which frankly simply confuses me (can you imagine arrays or lists in any other language not being able to contain arrays or lists?). At any rate, I need to create a data structure (size to be determined at runtime) which I will instantiate and then fill with vectors using a for loop. Clearly I'm new to the R game. Data Frame doesnt seem to be the right tool clearly.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Giovanni Petris <GPetris at uark.edu>
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/
More information about the R-help
mailing list