Northeastern University R Base Plotting Statistics Questions – coursefighter.com

Northeastern University R Base Plotting Statistics Questions – coursefighter.com

Mathematics – coursefighter.com

title: “Assignment 2 R Base Plotting”

output: html_document

“`{r setup, include=FALSE}

knitr::opts_chunk$set(echo = TRUE)

“`

**Instructions: All plots generated for this homework assignment must be a part of the R Base plotting functions. This means no GGPLOTS, plot.ly or any other package plot functions, only R Base**

Enter your name here:

**Step 1: Import the Global Orders 2016 data set using the read.csv function (5 points)**

“`{r step1, echo=TRUE}

“`

**Step 2 – Create a horizontal barplot of Total Sales by Market, ordered descending on total sales (i.e. the market with highest**

**total sales should be on the top) (25 points)**

“`{r step2, echo=TRUE}

“`

*Answer the following question: Does any market appear to be very different from the others for total sales?*

*Answer below:*

*Can you visually indicate this market as a separate color from the others?*

“`{r step2_outlier, echo=TRUE}

“`

**Step 3 – Create a line chart total sales by year for each market (25 points)**

“`{r step3, echo=TRUE}

“`

*Answer the following question: Does the same market appear to be different in your line graph as well?*

*Answer below:*

*Can you visually indicate this market as a separate color from the other markets in your graph?*

*Can you tell your markets apart from one another in your graph? If not consider what you need to add to your graph so that you can tell them apart*

“`{r step3_outlier, echo=TRUE}

“`

**Step 4 – Create a box plot of total sales by market (25 points)**

*Hint: use the ylim parameter to restrict your graph so that you tell the boxes apart*

“`{r step4, echo=TRUE}

“`

*Does the general pattern you observe match that of the earlier steps 2 and 3?*

*Answer below:*

*What other insights can you draw from your box plot above?*

*Answer below:*

*Can you visually indicate this market as a separate color from the others in your boxplot graph?*

“`{r step4_outlier, echo=TRUE}

“`

**Step 5 – Generate a different kind of graph other than what was produced in steps 2, 3, & 4 (20 points)**

*This means not a bar plot, line graph, or box plot. You need to use R Base plots for this question, not GGPLOT or any other plotting functions, only R Base.*

*Please see Week 2 Supporting Materials for helpful websites that have different types of plots for you to use. The syntax is similar to what we’ve done in lab 2*

Submit the following two files into the Assignment 2 drop box on Blackboard. HOwever you must first place them in a folder because Blackboard cannot accept .html files, so both files need to be in a folder before you submit that folder to blackboard.

Be sure to include your name in the filenames per the examples below.

File 1: This RMD document with your plots and answers completed above

Example: **Yoni_Dvorkis_ALY6070_Assignment2.Rmd**

File 2: HTML version of this file after you click “Knit” above

Example: **Yoni_Dvorkis_ALY6070_Assignment2.html**

***Academic Integrity Reminder:***

Collaborating on this assignment with anyone is strictly prohibited and will be considered a violation of your Academic Integrity Agreement that you signed prior to joining the program. This includes contacting former students of the course, or collaborating with currently enrolled students. If you have any questions on the assignment I expect you to reach out to me during class or after class dismisses, or you can email me at yonidvorkis@northeastern.edu.

Otherwise be sure to work on the assignment by yourself so that I know you’ve developed the skills to create these R Base graphs and did not copy your work from that of other students or from anywhere else. These skills are critical to being successful in the workforce and I want to be sure you’ve developed them by the time the course concludes.

Good luck!

coursefighter.com