R
Riaz
Hi,
I have a file with some data entries (that i dont care
about) but in Column L, I have a bunch of repetitive
numbers for each row, ranging from 1-19. I need to create
a dummy variable in new colums, like Dummy1... to Dummy19.
Whenever a particular number is occuring, 1 needs to be
assigned under the particular dummy, else 0 for all other
numbers.
For example (lets take 1-5):
L M N O P Q
IND Dummy1 Dummy2 Dummy3 Dummy4 Dummy5
3 0 0 1 0 0
3 0 0 1 0 0
4 0 0 0 1 0
5 0 0 0 0 1
5 0 0 0 0 1
5 0 0 0 0 1
1 1 0 0 0 0
1 1 0 0 0 0
2 0 1 0 0 0
2 0 1 0 0 0
If anyone could help me out with a program, that would be
very much appreciated. I cant do this manually because it
has more than 5000 rows! Thanks a lot!
I have a file with some data entries (that i dont care
about) but in Column L, I have a bunch of repetitive
numbers for each row, ranging from 1-19. I need to create
a dummy variable in new colums, like Dummy1... to Dummy19.
Whenever a particular number is occuring, 1 needs to be
assigned under the particular dummy, else 0 for all other
numbers.
For example (lets take 1-5):
L M N O P Q
IND Dummy1 Dummy2 Dummy3 Dummy4 Dummy5
3 0 0 1 0 0
3 0 0 1 0 0
4 0 0 0 1 0
5 0 0 0 0 1
5 0 0 0 0 1
5 0 0 0 0 1
1 1 0 0 0 0
1 1 0 0 0 0
2 0 1 0 0 0
2 0 1 0 0 0
If anyone could help me out with a program, that would be
very much appreciated. I cant do this manually because it
has more than 5000 rows! Thanks a lot!