Skip to content
Prev 82516 / 398506 Next

R-how to group the data

If your data frame is X then

unstack(X, value ~ type)

gives you a list with x and y components.  If you need
these as variables try attach(unstack(X, value ~ type))
or

with(unstack(X, value ~ type, {
  ... some computations ...
}
On 12/9/05, Subhabrata <subhabratapal at sraindia.com> wrote: