[R] Removing header from a matrix
arun
smartpink111 at yahoo.com
Mon Oct 8 13:29:51 CEST 2012
Hi,
You can also do this:
U1<-matrix(c(X1,X2,X3),ncol=3,nrow=2,byrow=FALSE)
U1
# [,1] [,2] [,3]
#[1,] 20 25 40
#[2,] 100 90 80
A.K.
----- Original Message -----
From: Dereje Bacha <d_bacha at yahoo.com>
To: "r-help at r-project.org" <r-help at r-project.org>
Cc:
Sent: Sunday, October 7, 2012 11:12 PM
Subject: [R] Removing header from a matrix
I have three column vectors (X1, X2, X3).
X1 X2 X3
20 25 40
100 90 80
I want to put them as one matrix of dimention 2 by 3, but remove headers(X1,X2,X3) from the matrix. I wrote
as follows
U<-cbind (X1,X2,X3)
the headers are there. I need help please. Thanks
Dereje
[[alternative HTML version deleted]]
______________________________________________
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.
More information about the R-help
mailing list