Posts

Showing posts from January, 2026

Week 2

 assignment2 <- c(16, 18, 14, 22, 27, 17, 19, 17, 17, 22, 20, 22) myMean <- function(assignment2) {   return(sum(assignment) / length(someData)) } myMean(assignment2) This returns an error as there are 2 erroneous variable names assignment and someData. A corrected program sets both of these to proper names such as:   myMean <- function(assignment2) {   return(sum(assignment2) / length(assignment2)) } myMean(assignment2) This calls to correct Variable and removes the error.

Week 1

Image
  I had no issues installing R because I have had it installed for quite a while.  Vectors in R are a collection of elements, all of which must be the same type. They are used to perform calculations on entire datasets. It also allows you to use statistical functions more directly on them. They are also easier to read at a glance.