Activity 3 Task 1

# -----------------
# Chunk 1
# -----------------

goalsList <- list("Understanding the use of interpreting data in the job market.", "Learn coding in terms of data science.", "Understand how knowledge in the class can develop increased knowledge or skills in any fields/jobs.")

listItemNum <- 1


# I wanted to try to see if I could print a list in the console log using a for loop incrementing through a vector.
print("Goals:")
## [1] "Goals:"
for(x in goalsList) { # Cited from w3schools, wasn't sure how to convert my mind from java's coding into R.
  print(paste(listItemNum, ".", x))
  # Increments to add the second numbered item in the list.
  listItemNum <- listItemNum + 1
}
## [1] "1 . Understanding the use of interpreting data in the job market."
## [1] "2 . Learn coding in terms of data science."
## [1] "3 . Understand how knowledge in the class can develop increased knowledge or skills in any fields/jobs."

Goals:

  1. Understanding the use of interpreting data in the job market.
  2. Learn coding in terms of data science.
  3. Understand how knowledge in the class can develop increased knowledge or skills in any fields/jobs.

This is an example of bold text whereas this is an example of italicized text.

Activity 3 Task 2

# -----------------
# Chunk 2
# -----------------

mtcars # Prints a chart of statistics of each car
mpg <- c(21.0, 21.0, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 19.2,17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 14.7, 32.4, 30.4, 33.9, 21.5, 15.5, 15.2, 13.3, 19.2, 27.3, 26.0, 30.4, 15.8, 19.7, 15.0, 21.4)

max(mpg)
## [1] 33.9
min(mpg)
## [1] 10.4
meanOfMPG <- mean(mpg)
print(meanOfMPG)
## [1] 19.92727
print(round(meanOfMPG, 1))
## [1] 19.9