[R] reshape direction=wide

Hanke, Alex HankeA at mar.dfo-mpo.gc.ca
Thu Feb 19 18:27:08 CET 2004


v.names=c("var1","var2") creates a separate column for each combination of
variables in v.names and level of variable identified by timevar.



I am reshaping a data.frame bids --> reshaped as shown below.

I thought this should be possible with a single invocation of
reshape, but the only way I came up with is reshaping subsets for each
keyword and then joining them together. Does anyone have an idea how to
solve this in a more elegant way? Efficiency is a concern as the datasets
are very large.

Is there a way to specify multiple v.names?



Alex Hanke
Department of Fisheries and Oceans
St. Andrews Biological Station
531 Brandy Cove Road
St. Andrews, NB
Canada
E5B 2L9




More information about the R-help mailing list