I Need help in R & RStudio

Aziz1100
HomeworkforWeek1.docx

Homework for Week 1 Fall 2019

Student Name:__________________ Student ID:_______

(Due Time: By 11:59pm on Sunday, 10/27/2019)

This is an individual assignment. Please download the dataset (Week-2-Homework.xlsx) and do the following work:

1) Use “New Drug” data (Hint: Please copy and paste the data on worksheet “New Drug” and create a text file or CSV file. Then, import/read the data from the file into R.)

a. Use R to create a histogram for Age.

b. Use R to show the mean, median, mode, standard deviation, min, and max for “Before_exp_BP” and “After_exp_BP”, respectively.

c. Use R to create a Box-Plot for “Before_exp_BP” and “After_exp_BP”, respectively.

d. Use R to create a stem-and-leaf for Age. Which one do you like, histogram or stem-and-leaf?

2) Use “MS Stock” and “PNC Stock” worksheets.

a. Use Excel or R to create a scatter plot for MS Open Price and PNC Open Price (Hint: you firstly need to copy both variables to one new worksheet, then start to work on a scatter plot). What kind of relationship between MS Open Price and PNC Open Price can be observed? (Hint: One diagram has two variables, “MS Open Price” and “PNC Open Price”. One for X axis, and the other one for Y axis.)

b. Use Excel or R to create a combination chart for MS Open Price and PNC Open Price. Briefly explain your observation. (Hint: Use different styles for two variables. For example, one is line, the other is bar. )

c. Use Excel to create sparkelines for Open, High, Low, Close, and Volume for MS Stock worksheet. Which one shows more volatile? (Hint: Create sparkline for each column, NOT row.)

3) Use Excel or R to create a heat map for Sales worksheet. Briefly explain the heat map. (Hint: Excel is recommended.)

4) Please replace “your name” with your true full name in Tree Map worksheet. Then, use Excel or R to create a tree map for this worksheet. Are you satisfied with your sales performance? Why, or Why not? (Hint: Excel is recommended.)

Please answer each question, and copy your work from R or/and Excel in one word file. After each question, please put your response directly. By the end of word file, please copy and paste your R script. You need to submit the excel file with data visualization as well.

In sum, you need to submit One word file and One excel file.

Please copy and paste your R scripts below.