Dear Gundala, Try
as.data.frame.table(foo) HTH, Jorge.- On Fri, Feb 1, 2013 at 5:00 PM, Gundala Viswanath <> wrote: > I have the following data frame: > > > foo > w x y z > n 1.51550092 1.4337572 1.2791624 1.1771230 > q 0.09977303 0.8173761 1.6123402 0.1510737 > r 1.17083866 1.2469347 0.8712135 0.8488029 > > What I want to do is to change it into : > > > newdf > 1 n w 1.51550092 > 2 q w 0.09977303 > 3 r w 1.17083866 > 4 n x 1.43375725 > 5 q x 0.81737606 > 6 r x 1.24693468 > 7 n y 1.27916241 > 8 q y 1.61234016 > 9 r y 0.87121353 > 10 n z 1.17712302 > 11 q z 0.15107369 > 12 r z 0.84880292 > > Whtat's the way to do it? > > - G.V. > > [[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. > [[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.