Pivot tables are an Excel concept, not an R concept.

That means you must give an example of your starting pivot table as an R
object (use dump() so we can pick it up from the email and execute it
immediately).
and an example of the R object you want as the result.
Use a trivial but complete example.

An example of dump

tmp <- matrix(1:6,2,3)
tmp
dump("tmp","")
Be sure to read the posting guide before sending your revised request.

PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
and provide commented, minimal, self-contained, reproducible code.

Rich
On Sat, Dec 3, 2011 at 5:27 PM, set <astareh@hotmail.com> wrote:

> Hello R-users,
>
> I've got a huge table with about 20.00 rows and 50 columns. The table now
> has headers as Members1, Members2 etc. My data are 8 different individuals.
> And I've got a column with clusters. So each individual belongs to
> different
> clusters and can occurs multiple times within a cluster (that's the reason
> that there can be more than 8 members). I want a presence/ absence table
> for
> each individual within each cluster.
> So I want to go from:
> Cluster   Member1    Member2  etc.
> 1            ind1           ind2
> 2            ind3           ind1
> 3            ind2           ind1
>
> to
>
> cluster    ind1          ind2      ind3
> 1            1               1          0
> 2            1                0         1
> 3            1               1          0
>
> Has anybody any idea how I can do this? I already tried alot of things with
> pivottables (using cast()) But I think I'm missing out on something.
> thank you
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/pivot-table-help-tp4155144p4155144.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

