Posts

Showing posts from February, 2025

Module 6 Assignment

Image
 Module 6 Assignment Github Repository:  https://github.com/christilly/LIS-6371-USF/blob/main/Module%206.R      This week I successfully followed the instructions for module 6. I created two matrices, A and B, and I added and subtracted them. Next, I built a matrix with 4,1,2,3 along the diagonal using the diag() function and using concatenation to get the numbers in the desired order. Lastly, I generated the desired matrix by creating matrix e with diagonal 3s with 4 rows and 4 columns (I figured out to start with a 4X4 to add the desired rows and columns to end in a 5X5). I added a row of 1s to the top and a column of 2s to the front using rbind() and cbind(). I learned that order in the arguments matters. Lastly, I changed the value in row 1 column 1 in matrix g to a 3. The result is the desired vector.       Creating the desired vector was the most difficult part of the assignment. I had to look through my notes on matrices to figure...

Module 5 Assignment

 Module 5 Assignment Github Repository:  https://github.com/christilly/LIS-6371-USF     For this assignment, I followed the outline given by Dr. Friedman in his announcement. My first attempt at the assignment was unsuccessful since running solve() on the two matrices gave the two errors of A being 0 and B not being a square matrix, therefore being unable to find the inverse matrix.      By following the assignment, I first made the two matrices A and B, with A being 10x10 and B being 10X100. Then, I created two new matrices (A_T and A_B) that are the transposed versions of A and B. I then made two vectors, with a being 10 values and b being 100 values, to scale the transposed A_T and B_T matrices into the matrices scale_A and scale_B. I made the two vectors those sizes to match the number of columns to scale_A and scale_B. Lastly, I created new_matrix where I multiplied scale_A and scale_B. The final result is successfully shown when printing new_matr...

Module 4 Assignment

Image
 Module 4 Assignment GitHub Repository:  https://github.com/christilly/LIS-6371-USF/blob/main/module4.R     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 ...

Module 3 Assignment

Image
Module 3 Assignment     Link to repository:  https://github.com/christilly/LIS-6371-USF/blob/main/module3.R     For this assignment, I created a data frame using the data that was provided. I changed some of the vector names to make them more understandable to myself. I was successfully able to create the data frame as shown below.      This week I also learned how to download the Github Desktop version and how to sync my online repositories onto the  desktop application.      I did not encounter any problems with this week's module.  Weekly readings: The Art of R programming: a tour of statistical software design by Norman Matloff Chapter 3-5.