Question
The dataset for a grocery stores transactions (Grocery.csv). The dataset contains over 14,000 transactions made by grocery store customers. The following variables are included in
The dataset for a grocery stores transactions (Grocery.csv). The dataset contains over 14,000 transactions made by grocery store customers. The following variables are included in the dataset:
Variable | Description |
Transaction | Transaction ID |
Purchase date | Date of purchase |
Customer ID | Customer ID |
Gender | Male or Female |
Annual Income | Household annual income |
Product Category | Product purchased |
Units Sold | Number of items purchased |
Revenue | Amount paid |
Import the data set to RStudio and perform the following tasks. For each task, you should provide the R command script and a partial screenshot from the Console panel in RStudio showing the resultsee an example in #1 below.
- Find the dimension of this data set (example):
- R Script command line: dim(Grocery)
- Result:
- Display the first record of the each of the variables
- R Script:
- Result:
- Display the third record of the each of the variables
- R Script:
- Result:
- Display the forth record of the first 3 variables
- R Script:
- Result:
- Display the first 5 records of Unit Sold
- R Script:
- Result:
- Convert Revenue from string to number
- R Script:
- Result (show the first five records in the table):
- Display the summary statistics for each variable
- R Script:
- Result:
- Interpret the results. Did you see any potential problems or missing values in the data set?
- Create a histogram for Revenue. Please use the geom_histogram() function in the ggplot package. Do NOT use the hist() function.
- R Script:
- Result (from the Plots panel):
- Interpret the result:
- Create a box plot for Revenue
- R Script:
- Result (from the Plots panel):
- Do a research online what is a box plot and interpret your result:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started