Generate a bar chart of a categorical variable for the gender. - Generate a bar chart graph with mean age in males and females - Make a histogram of a continuous variable “age”.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter3: Understanding Structure
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

"id"    "surgery"    "sex"    "age"    "weight"    "length"    "BMIpre"    "BMIpost"    "complic"    "comorb"    "depressi"    "diabetes"    "SES"
1    0    "Female"    26    100    1,57    40,56959714    31,03574182    0    0    0    0    2
2    0    "Female"    26    71    1,48    32,41417093    29,67494522    0    0    0    0    2
3    0    "Female"    53    97    1,6    37,890625    NA    0    0    0    0    2
4    0    "Female"    18    109    1,68    38,61961451    31,17913832    0    1    0    1    3
5    0    "Female"    37    100    1,63    37,63784862    27,47562949    0    0    0    0    1
6    0    "Female"    43    94    1,56    38,62590401    34,92767916    0    0    0    0    2
7    0    "Female"    36    105    1,64    39,03926234    24,5389649    1    1    0    0    3
8    0    "Female"    43    107    1,57    43,40946894    27,99302203    1    0    0    0    2
9    0    "Female"    41    103    1,6    40,234375    37,5    1    0    0    0    2
10    0    "Female"    24    93    1,69    32,56188509    27,30996814    0    0    0    0    3
279    0    "Male"    52    128    1,8    39,50617284    30,86419753    1    0    0    0    3
280    0    "Male"    50    100    1,74    33,02946228    NA    0    0    0    0    1
281    0    "Male"    17    NA    NA    NA    NA    0    1    0    0    2
282    0    "Male"    45    117    1,9    32,4099723    NA    1    0    0    0    2
283    0    "Male"    26    145    1,82    43,77490641    33,8123415    0    0    0    0    3
284    0    "Male"    54    128    1,8    39,50617284    NA    0    0    0    0    1
285    0    "Male"    26    142    1,87    40,60739512    NA    0    0    0    0    1
286    0    "Male"    42    106    1,78    33,4553718    NA    0    1    0    0    3
287    1    "Male"    58    115    1,68    40,74546485    33,30498866    1    1    0    0    2
288    1    "Male"    41    146    NA    NA    NA    0    1    0    0    1
289    1    "Male"    35    162    1,75    52,89795918    39,18367347    1    0    0    0    2
290    1    "Male"    34    110    1,72    37,18226068    NA    0    1    0    0    3

By using R language Perform the following:

Question(7)

- Generate a bar chart of a categorical variable for the gender.
- Generate a bar chart graph with mean age in males and females
- Make a histogram of a continuous variable “age”.

Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Strongly connected components
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage