[R] Explanation w.r.t. rbind, please!

2010-01-29 Thread Uwe Dippel
This is what I tried: num.vec - c(12.34,56.78,90.12,34.56) names(num.vec)-c(first,second,third,fourth) num.vec first second third fourth 12.34 56.78 90.12 34.56 seq-(1:4) num.mat-rbind(num.vec,seq) num.mat first second third fourth

Re: [R] Explanation w.r.t. rbind, please!

2010-01-29 Thread Gavin Simpson
On Fri, 2010-01-29 at 18:56 +0800, Uwe Dippel wrote: This is what I tried: num.vec - c(12.34,56.78,90.12,34.56) names(num.vec)-c(first,second,third,fourth) num.vec first second third fourth 12.34 56.78 90.12 34.56 seq-(1:4)

Re: [R] Explanation w.r.t. rbind, please!

2010-01-29 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Uwe Dippel Sent: Freitag, 29. Januar 2010 11:57 To: r-help@r-project.org Subject: [R] Explanation w.r.t. rbind, please! This is what I tried: num.vec - c

Re: [R] Explanation w.r.t. rbind, please!

2010-01-29 Thread Uwe Dippel
Meyners,Michael,LAUSANNE,AppliedMathematics wrote: What you (probably) want here is num.mat [seq,] num.mat [num.vec] [1] NA NA NA NA num.mat[num.vec,] and so on. You have to use tell R that you want the ROW (that's why the comma is needed) defined by the NAME seq or num.vec