Re: [R] convert vector to matrix

From: Alberto Monteiro <>
Date: Wed 04 Oct 2006 - 21:55:00 GMT

Gavin Simpson wrote:
> Did you even try to use cbind on your vector? I guess not as,
> > vec <- 1:10
> > mat <- cbind(vec)
> > mat
Why does mat remain a matrix instead of "losing" one dimension? I am reading the FAQ at... dimensions_003f
... and it seems that anything you do to mat should turn it back into a one-dimensional vector.

Alberto Monteiro mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu Oct 05 07:58:51 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 04 Oct 2006 - 23:30:08 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.