1.Download instructions on how to import data into R
This is a super fun cheat sheet! I had a version of this for SQL and it was so helpful! I’m glad to have found a version for R – this is definitely going in my file depository. Even better, its for TidyVerse! Which is my library of choice for R 🙂
2.Chapters 1-3 from Matloff, Wickham Chapter 13
Things I learned:
- Matrices facilitate linear algebra calculations
- Images count as a matrix – I hadn’t thought about it like that before, but in retrospect that makes a lot of sense
- You can read image matrices in R using a library called pixmap – very cool
3. Your assignment, evaluate the following function call myMean. The data for this function called assignment.

This function is working as intended. How it works is that the custom function myMean() takes the vector, assignment2, as an argument. Technically, the argument did not need to be named assignment2, it could have been named x, vector, potato, so long as the function moving forward used that same name.
Then, the function takes the sum of the vector (adding up each value) and divides it by the length of the vector (how many elements are in the vector). Double checking our custom function against the base r function mean(), we can see that both of these functions are returning the same value.
Here is a link to the github page where you can find my rmd file: here
Leave a comment