Yeah, I think there is some miscommunication. I'm using this text file, which has 70 subjects. id is two columns wide, drug is 1 column wide, systolic is 8.4 and weight is 8.4. As you can see below, there are two values of sbp and wt for each subject. I'm trying to code it so that each subject has wt1, wt2, sbp 1, sbp2. The code I have in my question does this except for the last person (subject 70). 1 0159.5681326.4100 1 0151.9329293.6876 2 0165.4389300.5860 2 0150.1996283.7959 3 0171.4973280.8458 3 0151.1499259.6988 4 0165.4576286.6310 4 0141.5292266.9363 5 0159.3755334.0693 5 0142.7102321.2893 6 0166.5624293.6374 6 0132.2037283.6696 7 0169.0907343.9146 7 0141.9615323.3449 8 0163.5120304.5511 8 0152.7732290.4707 9 0166.2658261.5245 9 0149.9705230.7379 100169.7736304.6510 100156.5528276.4445 110169.1036304.9042 110152.4192286.9123 120170.2859330.0572 120157.6702303.2747 130161.8547300.8148 130142.0642271.2437 140162.5493296.7611 140157.0179261.5387 150172.0278326.7975 150152.6488291.0720 160163.7540293.8948 160141.5212273.8226 170162.3134320.7320 170152.7504290.6913 180159.2775271.4223 180132.4960240.5594 190167.2594303.5583 190157.9902286.2519 200170.7307296.1399 200169.6361266.6828 210162.1713333.3012 210159.1371306.1875 220162.3564296.5399 220156.5967263.7341 230152.7704274.2653 230150.7561240.2737 240173.6744259.8890 240152.2780243.6764 250166.0481334.5533 250157.7285311.3080 260160.4775301.0612 260142.2116274.6485 270166.6046343.6577 270136.9973311.4744 280167.1002264.2434 280156.1143246.0969 290169.7849303.6547 290142.9119286.8014 300166.4623319.8161 300142.2134283.0690 310166.7051283.6408 310153.9403260.3265 320162.9531299.2106 320152.0810271.1111 330166.0902343.9262 330156.6240311.2010 340166.8419296.1088 340147.9662281.9905 350162.2641294.7835 350156.2530274.8917 361162.8022311.7296 361128.1358296.0558 371164.2243330.0920 371135.2787311.0607 381162.7693281.4027 381128.2672260.5932 391166.3379330.8296 391125.1558303.4728 401166.3239306.0454 401134.7172279.9112 411161.6041323.5907 411131.2541300.7474 421161.1067263.3350 421117.9163234.8007 431168.4125263.4290 431127.6125246.3988 441172.6001316.2644 441151.8035284.2606 451162.5576299.5690 451134.8550274.7804 461161.2977346.9898 461151.0471321.8582 471166.0088254.4366 471141.5393246.7747 481168.6832326.1522 481117.7683290.8532 491168.2362260.2254 491145.7905221.4781 501168.3405286.7257 501138.5886251.2554 511161.8059320.6078 511135.8792306.8499 521162.6127290.8030 521117.5527259.0737 531162.2732330.1135 531137.8331293.8114 541165.2403320.4246 541151.1756300.1615 551169.9302310.9467 551145.9754280.5010 561161.4438309.0915 561144.2470286.4452 571161.9408279.3986 571137.3766263.4707 581168.0201279.5537 581127.7842251.8098 591168.7627279.2311 591117.7954253.5130 601163.1336319.3774 601146.4423294.7547 611161.4851289.2949 611137.9098260.5804 621160.7298263.7955 621127.0981241.2411 631168.2941326.0085 631127.4673296.0329 641168.7856334.6582 641131.4100313.1587 651168.0534323.0171 651127.9741293.9351 661161.5909313.5617 661136.0589293.9657 671162.8097306.7994 671135.2356280.4640 681165.3995313.8665 681117.7197294.2240 691161.5544336.9836 691138.0893324.4739 701165.2871291.7631 701144.2423264.4141
... View more