Write the R-code to extract various nutritional values from different food varieties in the given nutrition XML document.

computer science

Description

Question 1(RCODE) Write the R-code to extract various nutritional values from different food varieties in the given nutrition XML document. If someone ate all the food items at once, plot a chart to compare it to the daily value for total-fat, saturated-fat, cholesterol, sodium, carb, fiber, protein.  DATA for this can be found in nutrional value xml file aattachment.

 

Question 2: Find the correlation between the cholesterol values and carbohydrate values that you extracted in Question 1. Please submit the R code and the value of Pearson's product-moment correlation (NOTE: REFER TO QUESTION 1 (RCODE)

 

 question 6:  Write an R-code for box plot to show the frequency of admitted students in UCBAdmissions data across various departments.

(This data is already installed in my Rstudio write the code for this one )

> ucba
      Admit Gender Dept Freq
1  Admitted   Male    A  512
2  Rejected   Male    A  313
3  Admitted Female    A   89
4  Rejected Female    A   19
5  Admitted   Male    B  353
6  Rejected   Male    B  207
7  Admitted Female    B   17
8  Rejected Female    B    8
9  Admitted   Male    C  120
10 Rejected   Male    C  205
11 Admitted Female    C  202
12 Rejected Female    C  391
13 Admitted   Male    D  138
14 Rejected   Male    D  279
15 Admitted Female    D  131
16 Rejected Female    D  244
17 Admitted   Male    E   53
18 Rejected   Male    E  138
19 Admitted Female    E   94
20 Rejected Female    E  299
21 Admitted   Male    F   22
22 Rejected   Male    F  351
23 Admitted Female    F   24
24 Rejected Female    F  317


Related Questions in computer science category