[R] reshape a dataset

Sohail Khan sohail13 at gmail.com
Fri Aug 15 00:08:51 CEST 2014


Hi
I have data set as follows:
  A 92315  A 35018  A 56710  B 52700  B 92315  B 15135  C 35018  C 52700
I would like to transform this data set into:
  ID 92315 35018 56710 52700 15135  A 1 1 1 0 0  B 1 0 0 1 1  C 0 1 0 1 0
I looked into reshape package to no avail.
I would appreciate any suggestions.

-Sohail

	[[alternative HTML version deleted]]



More information about the R-help mailing list