I need the code in SAS and R and outputs please
2. The data below come from a study investigating a method ofmeasuring body composition, and give the body fat percentage (%fat), age and sex for 18 adults aged between 23 and 61 years.Source: Mazess, R.B., Peppler, W.W., and Gibbons, M. (1984) Totalbody composition by dual-photon (153GD) absorptiometry. AmericanJournal of Clinical Nutrition, 40, 834-839.
age | % fat | sex |
23 | 9.5 | male |
23 | 27.9 | female |
27 | 7.8 | male |
27 | 17.8 | male |
39 | 31.4 | female |
41 | 25.9 | female |
45 | 27.4 | male |
49 | 25.2 | female |
50 | 31.1 | female |
53 | 34.7 | female |
53 | 42.0 | female |
54 | 29.1 | female |
56 | 32.5 | female |
57 | 30.3 | female |
58 | 33.0 | female |
58 | 33.8 | female |
60 | 41.1 | female |
61 | 34.5 | female |
a Enter the data into SAS using a DATALINES statement in theDATA step. Use PROC PRINT to print the resulting data set. Reportyour output.
b Create a data frame in R for the body composition data (frompart a). Print the data frame and report the output.