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
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)
-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
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
4 matches
Mail list logo