[R] Matrix manipulation

Alan T. Arnholt arnholt at math.appstate.edu
Wed May 23 13:32:34 CEST 2001


Kevin,

Try something with cbind like
> foo <- trash[,2:8]
> goo <- trash[,11:12]
> foogoo <- cbind(foo,goo)
> foogoo

Alan

On Wed, 23 May 2001 10:56:43 +0000 Ko-Kang Kevin Wang 
<ko-kang at xtra.co.nz> wrote:

> Hi,
> 
> Suppose I have a matrix with, say 12 columns.
> 
> I would like to extract out column 2 ~ 8 and 11 ~ 12 then combine them together.
> 
> I tried with success to extract out the columns by doing:
>  foo <- test[,2:8]
>  goo <- test[,11:12]
> 
> However then I am having trouble combining foo and goo.
> 
> Helps are appreciated!
> 
> Cheers,
> 
> Kevin
> 
> -----------------------------------
> Ko-Kang Kevin Wang
> Statistical Analysis Division Leader
> Software Developers' Klub (SDK)
> University of Auckland
> New Zealand
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

----------------------
Alan T. Arnholt
Associate Professor
Department of Mathematical Sciences
Appalachian State University
Boone, NC 28608

http ://www1.appstate.edu/~arnholta/
TEL: 828-262-2863
FAX: 828-265-8617

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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