This is my post for the first homework
knitr::opts_chunk$set(echo = FALSE)
vector <- c(1,2,3,4,5)
new_vector <- c(3,5,1,1,2)
avg_vector <- (vector + new_vector)/2
perc_vector <- avg_vector/5
final_vector <- perc_vector*100
First I input two vectors: vector = 1, 2, 3, 4, 5 and new_vector = 3, 5, 1, 1, 2 Then I take the average of these two vectors creating avg_vector = 2, 3.5, 2, 2.5, 3.5 Then I divide the average of the vectors by 5 (perc_vector = 0.4, 0.7, 0.4, 0.5, 0.7) and finally I multiple the vector by 100 (final_vector = 40, 70, 40, 50, 70).
Distill is a publication format for scientific and technical writing, native to the web.
Learn more about using Distill at https://rstudio.github.io/distill.
Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
McGrew (2021, Aug. 11). DACSS 601 August 2021: Post 1 HMWK 1. Retrieved from https://mrolfe.github.io/DACSS601August2021/posts/2021-08-11-post-1-hmwk-1/
BibTeX citation
@misc{mcgrew2021post, author = {McGrew, Annie}, title = {DACSS 601 August 2021: Post 1 HMWK 1}, url = {https://mrolfe.github.io/DACSS601August2021/posts/2021-08-11-post-1-hmwk-1/}, year = {2021} }