astfoodStats Assignment Description For this assignment, name your R file fastfoodStats.R For all questions you should load tidyverse, openintro, and lm.beta.  You should not need to use any other libraries. suppressPackageStartupMessages(library(tidyverse)) suppressPackageStartupMessages(library(openintro)) suppressPackageStartupMessages(library(lm.beta)) The actual data set is called fastfood. Continue to use %>% for the pipe. CodeGrade does not support the new pipe. Round all float/dbl values to two decimal places. All statistics should be run with variables in the order I state E.g., "Run a regression predicting mileage from mpg, make, and type" would be: lm(mileage ~ mpg + make + type...) To access the fastfood data, run the following: fastfood <- openintro::fastfood Create a correlation matrix for the relations between calories, total_fat, sugar, and calcium for all items at Sonic, Subway, and Taco Bell, omitting missing values with na.omit(). Assign the matrix to Q1. The output should look like this:                calories    total_fat     sugar     calcium calories      1.00        0.81          0.45       0.61 total_fat      0.81        1.00          0.10       0.24 sugar         0.45        0.10          1.00       0.67 calcium       0.61        0.24         0.67       1.00

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter10: Classes And Objects
Section: Chapter Questions
Problem 2E: Open the Palace Solution.sln file contained in the VB2017\Chap10\Palace Solution folder. Use Windows...
icon
Related questions
Question

astfoodStats Assignment Description

For this assignment, name your R file fastfoodStats.R

  • For all questions you should load tidyverse, openintro, and lm.beta.  You should not need to use any other libraries.

suppressPackageStartupMessages(library(tidyverse))

suppressPackageStartupMessages(library(openintro))

suppressPackageStartupMessages(library(lm.beta))

The actual data set is called fastfood.

  • Continue to use %>% for the pipe. CodeGrade does not support the new pipe.
  • Round all float/dbl values to two decimal places.
  • All statistics should be run with variables in the order I state
    • E.g., "Run a regression predicting mileage from mpg, make, and type" would be:

lm(mileage ~ mpg + make + type...)

To access the fastfood data, run the following:

fastfood <- openintro::fastfood
  1. Create a correlation matrix for the relations between calories, total_fat, sugar, and calcium for all items at Sonic, Subway, and Taco Bell, omitting missing values with na.omit().
  • Assign the matrix to Q1. The output should look like this:
               calories    total_fat     sugar     calcium
calories      1.00        0.81          0.45       0.61
total_fat      0.81        1.00          0.10       0.24
sugar         0.45        0.10          1.00       0.67
calcium       0.61        0.24         0.67       1.00
Expert Solution
Step 1

Introduction

Co-relational matrix:

A correlation matrix is a matrix that depicts the linear relation of a number of variables. Pearson's correlation, which quantifies the sequential association between two variables, is displayed by the submissions inside the mixture. Pearson's correlations can vary from -1 to 1, with -1 representing a perfect negative linear relationship, 1 representing a perfect positive linear relationship, and 0 representing no linear relationship. In exploratory data analysis, the correlation matrix is frequently used to identify and visualize relationships between variables.

 

 

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning