Posts

Showing posts from February, 2026

Module # 6 Doing math in R part 2

Image
 VaShay Carpenter Answer the following questions and post your answer on your blog: 1. Consider A=matrix(c(2,0,1,3), ncol=2) and B=matrix(c(5,2,4,-1), ncol=2).     a) Find A + B     b) Find A - B 2. Using the diag() function to:     build a matrix of size 4 with:      the following values in the diagonal 4,1,2,3. 3. Generate the following matrix:   Hint: You can use the command diag() to build it. Github Link: https://github.com/cryo-cell/r-programming-assignments/blob/main/module6doingmath.Rmd

Module #5 Doing Math

Image
 VaShay Carpenter Your Assignment : Find the value of inverse of a matrix, determinant of a matrix by using the following values: A=matrix(1:100, nrow=10) B=matrix(1:1000, nrow=10) Post your result and procedure you took on your blog. Assignment Results: Determinant of A:  0 Inverse of A: Undefined (Singular Matrix) Determinant/Inverse of B: Undefined (Non-square Matrix) This assignment demonstrates that having a matrix of numbers is not enough to perform high-level linear algebra. The computation failed since the numbers must represent independent information. Matrix A is a 'Singular Matrix,' meaning it lacks an inverse. The values 1:100 are in a perfect arithmetic progression. A matrix with linearly dependent rows has a determinant of 0  and therefore no inverse . Before performing operations like regressions or rotations, one must ensure the matrix is non-singular.

Module # 4 Programming structure assignment

Image
 VaShay Carpenter Objective: The goal was to transform unstructured hospital observation data into a clean data frame to analyze the relationship between patient vitals (Blood Pressure) and clinical decision-making. The following data was collected by the local hospital. This data set contains 5 variables based on the observation of 10 patients. In addition to the measurements of the patients checking in to the hospital that night, this data provides the patients' histories regarding the frequency of their visits to the hospital in the last 12 months. This data displays the measurement of blood pressure, first assessment by a general doctor (bad=1, good =0) titled "first," the second assessment by an external doctor (called "second"), and the last row provides the head of the emergency unit's decision regarding immediate care for the patient based on the values  0 or 1 (low = 0, high =1). The names of your variables are as follows:  "Freq","b...