LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 18 May 2009 08:49:08 -0700
Reply-To:   oslo <oslo@yahoo.com>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   oslo <hokut1@YAHOO.COM>
Subject:   reshape data problem
Content-Type:   text/plain; charset=iso-8859-1

Dear All;

I have three data set. Each one located in different file. The first one is for SNPs, the second one for phenotypes and the last one for covariates. The number of observation in those files are 1940, 2500 and 2000, respectively. I would like create a new data set for the SNPs which the sub_id in the first file has phenotypes and covariates values as well. I would be greatly appreciated if one tell me how can I do this. A small portion of data for each file are as follows.

TIA Oslo

data a; input sub_id $ snp1-snp10986; cards; A048005080 A G A G A G A G G G ...... A048006063 A G A G G G A G G G A048006555 G G A A G G G G G G A048007096 A G A G A G A G G G A048010273 G G A A G G G G G G A048010371 A G A G A G A G G G A048011040 A G A G A G A G G G A048011287 A G A G G G A G G G A048011567 A G A G G G A G G G A048013559 G G A A G G G G G G A048015047 G G A A G G G G G G A048017615 A G A G A G A G G G A048019267 G G A A G G G G G G A048021023 A G A G A G A G G G . . A048022858 A G A G A G A G G G

data b; sub_id $ bmi Length Month Year Season $ seconds gender $ Density cageno Litter; cards; A048005080 -0.520131 8.2 5 2003 spring 106 F 25.3 2 5 A048005112 -0.599354 8 4 2003 spring 92 F 16.7 3 4 A048006063 -0.401116 8.2 3 2003 spring 64 M 31.6 5 4 A048006555 -0.526935 8.1 4 2003 spring 78 M 28.2 4 1 A048007096 -0.415274 7.6 3 2003 spring 43 M 27.1 4 4 A048010273 -0.546143 7.8 1 2003 winter 5 F 20.9 6 1 A048010371 -0.394471 6.7 3 2003 spring 57 M 22.8 7 3 A048011040 -0.547702 6 3 2003 spring 71 M 14.4 3 1 A048011287 -0.480725 8.8 4 2003 spring 99 M 27.7 4 1 A048011567 -0.513760 8.2 3 2003 spring 71 M 26.1 3 . A048013559 -0.512076 7.5 2 2003 winter 36 F 20.9 1 . A048015047 -0.465510 6.9 5 2003 spring 106 M 20.1 3 . . . A048017615 -0.478513 8.1 2 2003 winter 15 M 23.5 7 1 data c; input sub_id $ ca_id; A048028856 10A A048104514 11A A048106317 7A A048280837 10A A048287013 10A A048007096 10B A048039840 10B A048273042 19B A048283353 21B . . A048115324 11G


Back to: Top of message | Previous page | Main SAS-L page