[R] matrix with fix number columns but variable number rows

Sven Garbade garbade at psy.uni-muenchen.de
Tue Mar 19 10:06:42 CET 2002


Francisco J Molina wrote:

> I have to store a number of vectors of the same length. I know the
> length but I do not know the number of vectors.
>
> How can I store them as they are created (they are created one by one)?

Maybe

data <- vector(mode="numeric")
# and here functions, loops  or whatever to read the data
newdata <- datafromanywhere
data <- rbind(data, newdata)

Regards, Sven




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list