Hi Friends, i'm new to R....I have data frame having columns X Y Z....I want to do pivot on this data frame....can any one help me on this... Thanks, Namit -- View this message in context: http://r.789695.n4.nabble.com/Create-a-Pivot-tp4637629.html Sent from the R help mailing list archive at Nabble.com.
Can you be more specific? Make up a small data set and show us what you want. Use dput(dataset) to produce a version that is easy to paste into your message. Pivot could mean many things. Transpose? Cross tabulate (as in Excel)? Aggregate (again Excel)? Principal axes? ---------------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of namit > Sent: Tuesday, July 24, 2012 12:53 PM > To: r-help at r-project.org > Subject: [R] Create a Pivot > > Hi Friends, > > i'm new to R....I have data frame having columns X Y Z....I want to > do > pivot on this data frame....can any one help me on this... > > Thanks, > Namit > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Create-a- > Pivot-tp4637629.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.
Define what you mean by a pivot. I know what a pivot table in Excel is and you can easily create the equivalent one in R, but you have supplied no data and have not indicated what you want as output in the "cells" of the pivot table -- e.g., counts, sums percentages, etc. You need to show some data and then what you would expect as output. On Tue, Jul 24, 2012 at 1:52 PM, namit <saileshchowdary at gmail.com> wrote:> Hi Friends, > > i'm new to R....I have data frame having columns X Y Z....I want to do > pivot on this data frame....can any one help me on this... > > Thanks, > Namit > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Create-a-Pivot-tp4637629.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.-- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.