Challenges Set 2

Instructions

Use the starwars dataset from the dplyr package (loaded already with tidyverse) to complete the below challenges. I highly recommend all of you to first get to know the starwars dataset by trying the “Get to know your data” functions covered at the beginning of the Week 2 Starter file. Good luck and have fun in completing them:

Important

If you want to add a twist.. can you complete them also using the pipe (|>)?

Challenge 1: Compute the average, median and standard deviation of the characters’ mass for each species.

Challenge 2: Display only the character’s name, species, and homeworld columns.

Challenge 3: Reorder the dataset to display characters starting from the one with the smallest birth_year.

Challenge 4: Add a new column named “compactness” that is equal to the characters’ heights divided by their mass.

Challenge 5: Calculate the minimum and maximum heights of all the characters.

Challenge 6: Find the characters who are female and have blonde hair and heights bigger or equal to 150.

🛑 Don’t Click Submit Just Yet 🚧

Please read carefully the below information:

  • Once you have completed all the coding challenges, and your confident in your work, copy and paste your responses from the chunk into the form fields below each challenge.

  • You are responsible for correctly coping and pasting only the required code to solve each challenge We will grade only what you have submitted!

  • We will only grade 1 submission per student so do not click Submit until you are confident in your responses.

  • By submitting this form you are certifying that you have followed the academic integrity guidelines available in the syllabus. The code and answers submitted are the results of your work and your work only!

  • Make sure you have completed all the challenges and included all the required personal information (e.g., full name, email, zid) in the respective form’s fields.

  • Now you are ready to click the above “Submit” button. Congrats you have completed this set of challenges!!!