Create a tibble conttaiiscount_customer=1ning driver names of instance where free_wine=1,discount_customer=1 and the order contained more than 4 pizzas.(There can be repeated names). Assign the tibble to Q1 Create a Variable named ratio that is the ratio of bill to pizza , called ratio.What is the mean of that value (call the value mean_ratio) ?Assign this to Q2 For each day of the week , what is the variance in pizzas? Assign this to Q3

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
  • Create a tibble conttaiiscount_customer=1ning driver names of instance where free_wine=1,discount_customer=1 and the order contained more than 4 pizzas.(There can be repeated names). Assign the tibble to Q1
  • Create a Variable named ratio that is the ratio of bill to pizza , called ratio.What is the mean of that value (call the value mean_ratio) ?Assign this to Q2
  • For each day of the week , what is the variance in pizzas? Assign this to Q3
For this assignment, name your R file pizza.R
• For all questions you should load tidyverse. You should not need to use any other
libraries.
o If the tidyverse package is not installed, you'll need to do a one-time installation
from the Console Window in RStudio like this:
install.packages ("tidyverse")
You cannot attempt to install packages in code that you submit to
Code Grade.
Load tidyverse with:
suppressPackageStartupMessages(library(tidyverse))
. Download the pizza.csv file from Brightspace and place it in the same folder/directory as
your script file. Then in RStudio, set your Working Directory to your Source File location:
•
Session Build Debug Profile Tools Help
New Session
Interrupt R
Terminate R...
Restart R
Set Working Directory
Load Workspace...
Save Workspace As...
Clear Workspace...
Quit Session...
Ctrl+Shift+F10
Ctrl+Q
Load the pizza.csv file like this:
pizza <- read_csv('pizza.csv')
Addins
To Source File Location
To Files Pane Location
Choose Directory...
Ctrl+Shift+H
•
Continue to use %>% for the pipe. CodeGrade does not support the new pipe.
• Round all float/dbl values to two decimal places.
o If your rounding does not work the way you expect, convert the tibble to a
dataframe by using as.data.frame()
• All statistics should be run with variables in the order I state
o E.g., "Run a regression predicting mileage from mpg, make, and type" would be:
lm (mileage ~ mpg + make + type...)
• In each of these you must use at least two dplyr functions. You may use Google to look
up how to do certain aspects.
Transcribed Image Text:For this assignment, name your R file pizza.R • For all questions you should load tidyverse. You should not need to use any other libraries. o If the tidyverse package is not installed, you'll need to do a one-time installation from the Console Window in RStudio like this: install.packages ("tidyverse") You cannot attempt to install packages in code that you submit to Code Grade. Load tidyverse with: suppressPackageStartupMessages(library(tidyverse)) . Download the pizza.csv file from Brightspace and place it in the same folder/directory as your script file. Then in RStudio, set your Working Directory to your Source File location: • Session Build Debug Profile Tools Help New Session Interrupt R Terminate R... Restart R Set Working Directory Load Workspace... Save Workspace As... Clear Workspace... Quit Session... Ctrl+Shift+F10 Ctrl+Q Load the pizza.csv file like this: pizza <- read_csv('pizza.csv') Addins To Source File Location To Files Pane Location Choose Directory... Ctrl+Shift+H • Continue to use %>% for the pipe. CodeGrade does not support the new pipe. • Round all float/dbl values to two decimal places. o If your rounding does not work the way you expect, convert the tibble to a dataframe by using as.data.frame() • All statistics should be run with variables in the order I state o E.g., "Run a regression predicting mileage from mpg, make, and type" would be: lm (mileage ~ mpg + make + type...) • In each of these you must use at least two dplyr functions. You may use Google to look up how to do certain aspects.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Study of Characters
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education