Posts

Showing posts from September, 2024

Module # 5 Doing Math

  Doing Math with a Matrix in RStudio 1) This week I am tackling matrices and inverse matrices in RStudio. Luckily this is something I have done before, so I expect this to go relatively smoothly.  2) What we will be doing is trying to "find the value of an 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)".  3) Now immediately I know that matrix B will not work because it is not a square, so I am simply not going to bother with it and just run with Matrix A. I will be using RStudio do calculations for the determinate of A, the inverse of A if it is non-singular, and if a inverse exists or not. 

Module # 4 Programming Structure

Image
  Hospital Data: Boxplot and Histogram 1) This week I am tasked with completing two major objectives. The first is to create a boxplot with some data I am given and the second is to create a histogram. The boxplot is to be a side by side boxplot, which I will be displaying Blood Pressure and Frequency. I will then create two histograms, one just about frequency and the other about blood pressure and frequency. The data I was given came in a way that I have to go and format it myself in RStudio. Here is what I came up with:

Module # 3 Data.frame

Image
  Data Frame with 2016 Election Results 1) This week I read chapters three through five of "The art of R programming" covering matri ces, arrays, lists and of course data frames. This is not the first time I have used data frames in RStuido and I get the feeling it won't be the last.  2) I was given the following piece of code and I am supposed to discuss my findings about it. The following code is completely made up and does not show the real election results. > Name <- c("Jeb", “Donald”, "Ted”, “Marco” “Carly”, “Hillary”, “Berine”) > ABC political poll results <- c(4, 62 51, 21, 2, 14, 15) > CBS political poll results <- c(12, 75, 43, 19, 1, 21, 19)  3) With this code I made a data frame, created a totals column for that data frame where which I could then use to sort the candidates by votes so that the candidates with the most votes would appear in descending order on a list. I then thought I could take it further by putting it on a pie...

Module # 2: RStudio and myMean

  The Function myMean 1) This week we read the first three chapter of  our text book "The Art of R programming" by Matloff, and Chapter of our textbook called R packages by Wickham. The first three chapter of Matloff go over the basic set of R, how vectors, arrays, matrices, scalars, rows, columns, R testing, packages and other basic aspects of coding work inside of R. I have taken a few classes with R in the past and there is not much new here. It was a good refresher though for this assignment.   2) The assignment I was tasked for this week was to evaluate the following function call myMean, provided with the data for myMean; assignement2. This is how it looked like: