logo Use SA10RAM to get 10%* Discount.
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Sumit DabraPhilosophy
(5/5)

879 Answers

Hire Me
expert
Samantha JiNursing
(5/5)

647 Answers

Hire Me
expert
Carlos HowarddEconomics
(5/5)

852 Answers

Hire Me
expert
K AndersonAccounting
(5/5)

583 Answers

Hire Me
R Programming
(5/5)

Accept the invitation to work with GitHub classroom and set up this project in your RStudio as shown in class.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

1. Setup your Assessment 1 project:

- Accept the invitation to work with GitHub classroom and set up this project in your RStudio as shown in class.

- create a RMarkdown document and save it in this project using assessment1.rmd

- Delete parts that you do not need in the RMarkdown template generated by default and copy the tasks below there. You need to leave the `meta data` section and initial R chunk.

- The title of your document should be Assessment 1

- The Author is your name and student id

- The date is the date you created the document

You will need to answer each task using the text/graph narration and include R chunks to show how you get them.

2 Create the heading of the first level and call it RMarkdown editing

3.Write 2-3 sentences about RMarkdown (you can google this information or use resources recommended in class - no need to reference)

 4. In the above use bold and italics for editing.

5. Review the suggested documentation on how to insert links in the .rmd file and include an in-text link to https://rmarkdown.rstudio.com/lesson-8.html

6. Insert an R chunk and create a variable with this dataset fastfood_calories.csv located on VU Collaborate

 

The name of the variable should be `fastfood`

7. Display the first 10 rows of the dataset using head() and Eable().

Display the first 10 rows of the dataset and the first 5 variables

Use Help and the link below to read more about those functions https://bookdown.org/yihui/rmarkdown-cookbook/kable.html

 

Save your file as .rmd

Pull-commit-push it to github!

 

### Part 2. - Due session 6 - continue in the same .rmd file, but please include "Part 2" as a

heading

 Copy the previous code from your part A submission to a new document to submit in your

Part B.

8. Display the observations that has more than 1000 calories

9. Arrange observations with more than 40 in total_fat and more than 80 in total_carb in the descending order (PLEASE USE THE VARIABLE OF YOUR CHOICE TO ORGANISE THE DESCENDING

ORDER) and save them to a new variable (dataset) called `dont_eat_this`

10. Using the initial dataset variable, use `case_when()` to create a new variable

`heavy_food` which is equal to "heavy" when total calories (`calories`) are greater than 500, "low" when total calories are less than 250 and "average" for all other cases. Count the number of observations in each created category.

11. Display the types of variables in the dataset using `skimr` package

12. Present the count observations from each restaurant in a descending order

Show the number of distnct items on a menu in the dataset

13. Using groupings (group_by()), summarise and display the average number of calories for each restaurant.

14. Add variables to the dataset, which:

 - calculates the average calories per type of restaurant and call it `average_calories`

- calculates the maximum total_fat per type of restaurant and call it `max_fat`

- calculates the minimum cholesterol per type of restaurant and call it `min_cholesterol`

15. Display the data vis of total fat per each type of restaurant. Write a narration (2-3 sentences) why you believe this type of data viz presents such information best.

16. Add a variable to the dataset, which calculates the sum of cholesterol and sodium and call it `cholesterol_sodium`.

Remove the variable `salad`

17. Use observations for Mcdonalds to plot sugar variable against protein with

`geom_point()`

Save your file as .rmd

Pull-commit-push it to github!

### Part 3. - Due session 8 - continue in the same file, but please include "Part 3" as a

heading

**Focus**: ggplot2, factors, strings, dates

 18. Identify variable(s) which should be factors and transform their type into a factor variable.

19. Create a new variable:

Read about `cut_number()` function using Help and add a new variable to the dataset

`calories_type`. Use `calories` variable for `cut_number()` function to split it into 3 categories `n=3`, add labels `labels=c("low", "med", "high")` and make the dataset ordered by arranging it according to calories.

Do not forget to save the updated dataset.

20. Create a dataviz that shows the distribution of `calories_type` in food items for each type of restaurant. Think carefully about the choice of data viz. Use facets, coordinates and theme layers to make your data viz visually appealing and meaningful. Use factors related data viz functions.

21. Add a new variable that shows the percentage of `trans_fat` in `total_fat` (`trans_fat`/`total_fat`). The variable should be named `trans_fat_percent`. Do not forget to save the updated dataset.

22. Create a dataviz that shows the distribution of `trans_fat` in food items for each type of restaurant. Think carefully about the choice of data viz. Use facets, coordinates and theme layers to make your data viz visually appealing and meaningful.

23. Calculate and show the average (mean) `total_fat` for each type of restaurant. No need to save it as a variable.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

432 Experts Online