hi
I have a long data. i would like that each categorie of one variable "class" became a collumn, without change the shape of my dataset. and drop the two additional rows of each date by state.
+----------------------------------------+
| year month state class count |
|----------------------------------------|
1. | 2010 1 11 CZS 4 |
2. | 2010 1 11 Non CZS 8 |
3. | 2010 1 11 Normal 2047 |
4. | 2010 1 12 Non CZS 4 |
5. | 2010 1 12 Normal 1299 |
|----------------------------------------|
6. | 2010 1 13 CZS 7 |
7. | 2010 1 13 Non CZS 35 |
8. | 2010 1 13 Normal 6411 |
9. | 2010 1 14 CZS 1 |
10. | 2010 1 14 Non CZS 5 |
+----------------------------------------+
Related Posts with change from row to collumn without reshape
How to drop specific columns and rows in matrix?I created a matrix named "m" with the following commands. Is there a simple way to remove all the r…
problem with multiple if conditionsI am having issues with using multiple if conditions with replace function. I have two variables i.e…
How to add R-squared in -esttab- regression? Code: sysuse auto, clear eststo: regress price weight mpg eststo: regress price weight…
Optimization does not convergeDear All, I have a black-box data generation routine, which depends on three parameters A,B,C. I ge…
How to transfer my string variable to date variable? Code: * Example generated by -dataex-. To install: ssc install dataex clear input str10 week float …
Subscribe to:
Post Comments (Atom)
0 Response to change from row to collumn without reshape
Post a Comment