Hello, Thanks to all for your answers. The solution given by R. Michael was perfect ! Thank you very much, that helped a lot ! Thomas
On Tue, Feb 28, 2012 at 11:50 AM, Alemtsehai Abate <abatea...@gmail.com>wrote: > Perhaps, the following does it as well. > > (d <- data.frame(x1=letters[2*1:4 - 1], x2=letters[2*1:4])) > > c(t(d)) > > > Alemtsehai > > > > > >> Hello, > >> I am looking for a way to transform an array into a list (or a string). > >> My array has two columns 1 and 2, and I would like to create a list of > the > >> values. > >> > >> Let's say I have : > >> > >> x1 x2 > >> 1 a b > >> 2 c d > >> 3 e f > >> 4 g h > >> > >> What I would like to obtain is a,b,c,d,e,f,g,h. > >> > >> I tried without success melt and reshape ( reshape(my_array, > >> direction="long", varying=1:2) ) but I cannot get it work. > >> > >> Thanks a lot !!! > >> thomas > > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.