[R] one long column of data -> three small columns

frenchcr frenchcr at btinternet.com
Tue Nov 3 21:26:25 CET 2009




frenchcr wrote:
> 
> say i have a column of data like this...
> 
> 2
> 3
> 4
> 2
> 1
> 6
> 6
> 4
> 7
> 
> and i want it in three columns like this
> 
> 226
> 314
> 467
> 
> ...so i can make a contour plot.
> 
> 
> How do i do this?
> 

ok, so matrix(x, 3, 3) works.

what if i have 

a
b
c
a
c
a
c

and want

a b c
a   c
a   c

??
-- 
View this message in context: http://old.nabble.com/one-long-column-of-data--%3E-three-small-columns-tp26163165p26163570.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list