Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Load the cereal.txt data set into R. a Create a scatter plot with sodium on the x-axis and sugars on the y-axis. Change the labels

Load the cereal.txt data set into R.

a Create a scatter plot with sodium on the x-axis and sugars on the y-axis. Change the labels on each so that the units are indicated. Make it so that the both the x-axis has tick marks every 50 mg from 0 to 350, and the y-axis has tick marks every 2.5 g from 0 to 15. Give the scatter plot an adequate title. Report the scatter plot.

b Create a scatter plot that includes two sets of data. Plot dietary fiber on the x-axis and sodium on the y-axis. Use blue circles as the markers and label the y-axis so that it reads only milligrams. Use the points() function to overlay a scatter plot of dietary fiber on the x-axis and potassium on the y-axis. Use red triangles as the markers. Create a legend to make a distinction between the two different sets of data. Report the scatter plot.

c Use the layout() function to create a multi-paneled image. Put a horizontal boxplot for calories in the first row. Scatter plots for calories vs fat and calories vs sugars in the second row, and vertical boxplots for both fat and sugars in the third road. Report the image.

cereal.txt

"name","mfr","type","calories","protein","fat","sodium","fiber","carbo","sugars","potass","vitamins","weight","cups" "100% Bran","Nabisco","cold",70,4,1,130,10,5,6,280,25,1,0.33 "100% Natural Bran","Quaker","cold",120,3,5,15,2,8,8,135,0,1,1 "All-Bran","Kelloggs","cold",70,4,1,260,9,7,5,320,25,1,0.33 "All-Bran with Extra Fiber","Kelloggs","cold",50,4,0,140,14,8,0,330,25,1,0.5 "Almond Delight","Ralston Purina","cold",110,2,2,200,1,14,8,0,25,1,0.75 "Apple Cinnamon Cheerios","General Mills","cold",110,2,2,180,1.5,10.5,10,70,25,1,0.75 "Apple Jacks","Kelloggs","cold",110,2,0,125,1,11,14,30,25,1,1 "Basic 4","General Mills","cold",130,3,2,210,2,18,8,100,25,1.33,0.75 "Bran Chex","Ralston Purina","cold",90,2,1,200,4,15,6,125,25,1,0.67 "Bran Flakes","Post","cold",90,3,0,210,5,13,5,190,25,1,0.67 "Cap'n'Crunch","Quaker","cold",120,1,2,220,0,12,12,35,25,1,0.75 "Cheerios","General Mills","cold",110,6,2,290,2,17,1,105,25,1,1.25 "Cinnamon Toast Crunch","General Mills","cold",120,1,3,210,0,13,9,45,25,1,0.75 "Clusters","General Mills","cold",110,3,2,140,2,13,7,105,25,1,0.5 "Cocoa Puffs","General Mills","cold",110,1,1,180,0,12,13,55,25,1,1 "Corn Chex","Ralston Purina","cold",110,2,0,280,0,22,3,25,25,1,1 "Corn Flakes","Kelloggs","cold",100,2,0,290,1,21,2,35,25,1,1 "Corn Pops","Kelloggs","cold",110,1,0,90,1,13,12,20,25,1,1 "Count Chocula","General Mills","cold",110,1,1,180,0,12,13,65,25,1,1 "Cracklin' Oat Bran","Kelloggs","cold",110,3,3,140,4,10,7,160,25,1,0.5 "Cream of Wheat (Quick)","Nabisco","hot",100,3,0,80,1,21,0,0,0,1,1 "Crispix","Kelloggs","cold",110,2,0,220,1,21,3,30,25,1,1 "Crispy Wheat & Raisins","General Mills","cold",100,2,1,140,2,11,10,120,25,1,0.75 "Double Chex","Ralston Purina","cold",100,2,0,190,1,18,5,80,25,1,0.75 "Froot Loops","Kelloggs","cold",110,2,1,125,1,11,13,30,25,1,1 "Frosted Flakes","Kelloggs","cold",110,1,0,200,1,14,11,25,25,1,0.75 "Frosted Mini-Wheats","Kelloggs","cold",100,3,0,0,3,14,7,100,25,1,0.8 "Fruit & Fibre Dates; Walnuts; and Oats","Post","cold",120,3,2,160,5,12,10,200,25,1.25,0.67 "Fruitful Bran","Kelloggs","cold",120,3,0,240,5,14,12,190,25,1.33,0.67 "Fruity Pebbles","Post","cold",110,1,1,135,0,13,12,25,25,1,0.75 "Golden Crisp","Post","cold",100,2,0,45,0,11,15,40,25,1,0.88 "Golden Grahams","General Mills","cold",110,1,1,280,0,15,9,45,25,1,0.75 "Grape Nuts Flakes","Post","cold",100,3,1,140,3,15,5,85,25,1,0.88 "Grape-Nuts","Post","cold",110,3,0,170,3,17,3,90,25,1,0.25 "Great Grains Pecan","Post","cold",120,3,3,75,3,13,4,100,25,1,0.33 "Honey Graham Ohs","Quaker","cold",120,1,2,220,1,12,11,45,25,1,1 "Honey Nut Cheerios","General Mills","cold",110,3,1,250,1.5,11.5,10,90,25,1,0.75 "Honey-comb","Post","cold",110,1,0,180,0,14,11,35,25,1,1.33 "Just Right Crunchy Nuggets","Kelloggs","cold",110,2,1,170,1,17,6,60,100,1,1 "Just Right Fruit & Nut","Kelloggs","cold",140,3,1,170,2,20,9,95,100,1.3,0.75 "Kix","General Mills","cold",110,2,1,260,0,21,3,40,25,1,1.5 "Life","Quaker","cold",100,4,2,150,2,12,6,95,25,1,0.67 "Lucky Charms","General Mills","cold",110,2,1,180,0,12,12,55,25,1,1 "Maypo","American Home Products","hot",100,4,1,0,0,16,3,95,25,1,1 "Muesli Raisins; Dates; & Almonds","Ralston Purina","cold",150,4,3,95,3,16,11,170,25,1,1 "Muesli Raisins; Peaches; & Pecans","Ralston Purina","cold",150,4,3,150,3,16,11,170,25,1,1 "Mueslix Crispy Blend","Kelloggs","cold",160,3,2,150,3,17,13,160,25,1.5,0.67 "Multi-Grain Cheerios","General Mills","cold",100,2,1,220,2,15,6,90,25,1,1 "Nut&Honey Crunch","Kelloggs","cold",120,2,1,190,0,15,9,40,25,1,0.67 "Nutri-Grain Almond-Raisin","Kelloggs","cold",140,3,2,220,3,21,7,130,25,1.33,0.67 "Nutri-grain Wheat","Kelloggs","cold",90,3,0,170,3,18,2,90,25,1,1 "Oatmeal Raisin Crisp","General Mills","cold",130,3,2,170,1.5,13.5,10,120,25,1.25,0.5 "Post Nat. Raisin Bran","Post","cold",120,3,1,200,6,11,14,260,25,1.33,0.67 "Product 19","Kelloggs","cold",100,3,0,320,1,20,3,45,100,1,1 "Puffed Rice","Quaker","cold",50,1,0,0,0,13,0,15,0,0.5,1 "Puffed Wheat","Quaker","cold",50,2,0,0,1,10,0,50,0,0.5,1 "Quaker Oat Squares","Quaker","cold",100,4,1,135,2,14,6,110,25,1,0.5 "Quaker Oatmeal","Quaker","hot",100,5,2,0,2.7,0,1,110,0,1,0.67 "Raisin Bran","Kelloggs","cold",120,3,1,210,5,14,12,240,25,1.33,0.75 "Raisin Nut Bran","General Mills","cold",100,3,2,140,2.5,10.5,8,140,25,1,0.5 "Raisin Squares","Kelloggs","cold",90,2,0,0,2,15,6,110,25,1,0.5 "Rice Chex","Ralston Purina","cold",110,1,0,240,0,23,2,30,25,1,1.13 "Rice Krispies","Kelloggs","cold",110,2,0,290,0,22,3,35,25,1,1 "Shredded Wheat","Nabisco","cold",80,2,0,0,3,16,0,95,0,0.83,1 "Shredded Wheat 'n'Bran","Nabisco","cold",90,3,0,0,4,19,0,140,0,1,0.67 "Shredded Wheat spoon size","Nabisco","cold",90,3,0,0,3,20,0,120,0,1,0.67 "Smacks","Kelloggs","cold",110,2,1,70,1,9,15,40,25,1,0.75 "Special K","Kelloggs","cold",110,6,0,230,1,16,3,55,25,1,1 "Strawberry Fruit Wheats","Nabisco","cold",90,2,0,15,3,15,5,90,25,1,1 "Total Corn Flakes","General Mills","cold",110,2,1,200,0,21,3,35,100,1,1 "Total Raisin Bran","General Mills","cold",140,3,1,190,4,15,14,230,100,1.5,1 "Total Whole Grain","General Mills","cold",100,3,1,200,3,16,3,110,100,1,1 "Triples","General Mills","cold",110,2,1,250,0,21,3,60,25,1,0.75 "Trix","General Mills","cold",110,1,1,140,0,13,12,25,25,1,1 "Wheat Chex","Ralston Purina","cold",100,3,1,230,3,17,3,115,25,1,0.67 "Wheaties","General Mills","cold",100,3,1,200,3,17,3,110,25,1,1 "Wheaties Honey Gold","General Mills","cold",110,2,1,200,1,16,8,60,25,1,0.75

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions