[R] Problems with rbind

Bayesianbay@aol.com Bayesianbay at aol.com
Tue Sep 10 14:35:15 CEST 2002


Dear list

I have a simple question that I have a mental block on:

Having used a loop (from i = 1 to n) to assign some numerical values to 
row.list[[i]]
e.g. row.list[[3]]= 0 1
I am wanting to combine the output into a simple matrix.

for example, if I combine the output from persons 1 to 3 into a matrix, I 
thought I could do :
h<-rbind(row.list[[1]]:row.list[[3]])

However, I get the errors:
1: Numerical expression has 2 elements: only the first used in: 
row.list[[1]]:row.list[[3]] 

Yet if I did this by using h<
-rbind(row.list[[1]],row.list[[2]],row.list[[3]]), this would work.

Could anybody explain how I can combine large values of the vectors (i.e. by 
using :) without resorting to having to write out each one in the command?

Many thanks 
Laura
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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