I've dataset like this:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id credit time) 12 1100 1101 12 1200 1102 13 1800 1303 13 475 1304 13 980 1305 13 600 1306 15 325 1201 15 478 1202 15 645 1203 15 741 1204 end
I want to merge each two rows into one, something like this:
id credit time
12 (1100+1200=1300) 1101
13 (1800+475) 1303
13 (980+600) 1305
15 (325+478) 1201
15 (645+741) 1203
where actually 1100+1200 will replace with 1300
actually results observations will be half of the primary observations.
thanks a lot
0 Response to Merging two rows
Post a Comment