Re: [R] Converting from a dataset to a single "column"

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Tue 24 Jan 2006 - 17:57:51 EST


Hi

?stack and ?unlist are good starting points.

HTH
Petr

On 23 Jan 2006 at 9:49, r user wrote:

Date sent:      	Mon, 23 Jan 2006 09:49:40 -0800 (PST)
From:           	r user <ruser2006@yahoo.com>
To:             	rhelp <r-help@stat.math.ethz.ch>
Subject:        	[R] Converting from a dataset to a single "column"

> I have a dataset of 3 columns and 5 rows .
>
> temp<-data.frame(col1=c(5,10,14,56,7),col2=c(4,2,8,3,34),col3=c(28,4,5
> 2,34,67))
>
> I wish to convert this to a single column , with
> column 1 on top and column 3 on bottom .
>
> i.e.
>
> 5
> 10
> 14
> 56
> 7
> 4
> 2
> 8
> 3
> 34
> 28
> 4
> 52
> 34
> 67
>
> Are there any functions that do this, and that will
> work well on much larger datasets (e.g. 1000 rows,
> 6000 columns)?
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal@precheza.cz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jan 24 18:06:39 2006

This archive was generated by hypermail 2.1.8 : Tue 24 Jan 2006 - 20:19:58 EST