[R] request: To add an extra row in a matrix

From: Muhammad Azam <mazam72_at_yahoo.com>
Date: Mon, 02 Jun 2008 02:03:38 -0700 (PDT)


Dear R users
I have a problem regarding an addition of an extra "row" to a matrix. e.g. i have a matrix a <- matrix(1:6,2,3)
> a

     [,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6
I want to add a matrix having just one row. e.g. b <- matrix(7:9,1,3)

> b

     [,1] [,2] [,3]
[1,] 7 8 9

Now i want to get result like this

     [,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6
[3,] 7 8 9
Can any body help to get the required result. Thanks and

best regards

Muhammad Azam
Ph.D. Student
Department of Medical Statistics,
Informatics and Health Economics
University of Innsbruck, Austria

      
	[[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. Received on Mon 02 Jun 2008 - 09:07:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Jun 2008 - 10:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive