[ESS] Help to get a code for recoding
mahfuz rahman
mahfuz_pops at yahoo.com
Sun Dec 27 12:08:00 CET 2015
Hi,Suppose I have following data file, the name of data file is A which is in CSV format.The first row represents the variable names.
s e d v1 v2 v3 v4 v5 v6;
2 6 2 1 . . . . .
3 5 0 1 1 . . . 1
. . . 1 1 1 1 . 1
2 3 5 1 . . 1 1 1
Now I want to put 5 in the variables starting from s=2 and ending at e=6, e.i. starting from v2 to v6, if the variable d is greater than 1. But I want the columns s & e as the index of starting and ending of entry, I don't want the incorporation of any value directly, so that I can use this programme for a very large number of variables and cases, and for that the entry of 5 in the data file depends on the s and e variables. e.g. If s is 2 then the recoding should start from v2 and if e is 6 the recoding should end at v6. Now I want my new table looks like as follows: s e d v1 v2 v3 v4 v5 v6 2 6 2 1 5 5 5 5 5 3 5 0 1 1 1 1 1 1 1 1 2 3 5 1 5 5 1 1 1
Is it possible to get this data in CSV? It would be great if you send me the code for doing this.
Thanks & RegardsMd. Mahfuzur RahmanDepartment of Population Science & Human Resource DevelopmentUniversity of Rajshahi Rajshahi-6025, Bangladesh
[[alternative HTML version deleted]]
More information about the ESS-help
mailing list