[R] data.frame extracting data row-wise

Karl Ove Hufthammer karl at huftis.org
Fri Oct 30 10:54:49 CET 2009


On Fri, 30 Oct 2009 10:42:12 +0100 Christian Lerch <t.c.l at gmx.net> 
wrote:
> I am struggling with extracting data from a data frame:
> x=data.frame(a=1:11,b=100:110)
> 
> What I want is a list/vector in this sence: 1 100 2 101 3 102...

y=t(as.matrix(x))
as.vector(y)

Happy to help.

-- 
Karl Ove Hufthammer




More information about the R-help mailing list