Module 4 Assignment

 Module 4 Assignment


    This week I used the boxplot() and hist() functions to create side-by-side box plots and histograms for the data provided in the assignment. The outputs are shown below. 
These histograms shows the different evaluations from the general doctor, external doctor, and emergency unit of the patient, with 0 being good and 1 being bad. The frequencies of 0s and 1s are shown in the histograms for each evaluating groups. As seen here, there were equal amounts of 1s (bad) among all three groups, but higher amounts of 0 (good) in the general doctor group. I used na.rm in my code to account for the NA value in one of the vectors. 

These graphs show the patient blood pressure data and patient visit frequencies as histograms. 

These graphs are the box plots for blood pressure, visit frequencies, and patient evaluations. I was unable to show the patient evaluations in a good way with the box plots since the data consists of binary 1s and 0s. 

Overall, I was able to figure out how to create the graphs and view the outputs in RStudio. I got help from ChatGPT because I had trouble with formatting (creating headers, x labels, and displaying the graphs side by side). Once I was able to figure out the general formatting, I was able to create the graphs independently to how I desired. The only thing I had trouble figuring out for the patient evaluation histograms is how to format the X axis so the bins are labelled 0 and 1 instead of a range from -0.5 to 1.5. 




Comments

Popular posts from this blog

Module 10 Assignment

Module 1 Assignment