Task: Data Frame Creation 1. A pepper enthusiast puts together the following data set about different peppers (least spicy to most spicy), how hot they are, and how many days it takes to grow the pepper plants from seed. Pepper is the name of the pepper, Scoville Units is how hot the pepper is in thousands (the larger the number, the hotter the pepper), and Growing Time represents how many days on average it takes to grow the pepper from seed. Pepper Scoville Units (thousands) | Growing Time (Days) Bell Tabasco Ghost 0 50 855 75 80 120 (a) Create a vector called pepper consisting of the words Bell, Tabasco, Ghost. (b) Create a vector called scoville consisting of the Scoville Units as numbers. (c) Create a vector called days consisting of the Growing Times as numbers. (d) Combine these three vectors to create a data frame called HeatScale. (e) One of the hottest peppers in the world is the Carolina Reaper. The Reaper has a Scoville Unit (in thousands) of 2000, and a growing time in days of about 95 days. Create a vector called cr consisting of these values (pepper, scoville, days). (f) Add cr as a row to HeatScale. Make sure you work with the data frame you previously created, and not the original vectors. (g) Determine the variable type of each variable in HeatScale and describe any issues, if any, you observe. Include any code used and include your values as a comment. (h) Convert each variable to an appropriate type (numeric, character, factor, or ordered factor) within the data frame. For each type you choose, explain why you picked that type. Include your values as a comment in your code.
Task: Data Frame Creation 1. A pepper enthusiast puts together the following data set about different peppers (least spicy to most spicy), how hot they are, and how many days it takes to grow the pepper plants from seed. Pepper is the name of the pepper, Scoville Units is how hot the pepper is in thousands (the larger the number, the hotter the pepper), and Growing Time represents how many days on average it takes to grow the pepper from seed. Pepper Scoville Units (thousands) | Growing Time (Days) Bell Tabasco Ghost 0 50 855 75 80 120 (a) Create a vector called pepper consisting of the words Bell, Tabasco, Ghost. (b) Create a vector called scoville consisting of the Scoville Units as numbers. (c) Create a vector called days consisting of the Growing Times as numbers. (d) Combine these three vectors to create a data frame called HeatScale. (e) One of the hottest peppers in the world is the Carolina Reaper. The Reaper has a Scoville Unit (in thousands) of 2000, and a growing time in days of about 95 days. Create a vector called cr consisting of these values (pepper, scoville, days). (f) Add cr as a row to HeatScale. Make sure you work with the data frame you previously created, and not the original vectors. (g) Determine the variable type of each variable in HeatScale and describe any issues, if any, you observe. Include any code used and include your values as a comment. (h) Convert each variable to an appropriate type (numeric, character, factor, or ordered factor) within the data frame. For each type you choose, explain why you picked that type. Include your values as a comment in your code.
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question

Transcribed Image Text:Perform each of the requested steps in R code. Include comments in your code to indicate
which question you are answering. Please also include any written answers to questions and
computed values in your code. Add appropriate amounts of white space to make your
response easy to read.

Transcribed Image Text:Task: Data Frame Creation
1. A pepper enthusiast puts together the following data set about different peppers (least
spicy to most spicy), how hot they are, and how many days it takes to grow the pepper
plants from seed. Pepper is the name of the pepper, Scoville Units is how hot the pepper is
in thousands (the larger the number, the hotter the pepper), and Growing Time represents
how many days on average it takes to grow the pepper from seed.
Pepper Scoville Units (thousands) | Growing Time (Days)
Bell
Tabasco
Ghost
0
50
855
75
80
120
(a) Create a vector called pepper consisting of the words Bell, Tabasco, Ghost.
(b) Create a vector called scoville consisting of the Scoville Units as numbers.
(c) Create a vector called days consisting of the Growing Times as numbers.
(d) Combine these three vectors to create a data frame called HeatScale.
(e) One of the hottest peppers in the world is the Carolina Reaper. The Reaper has a
Scoville Unit (in thousands) of 2000, and a growing time in days of about 95 days.
Create a vector called cr consisting of these values (pepper, scoville, days).
(f) Add cr as a row to HeatScale. Make sure you work with the data frame you
previously created, and not the original vectors.
(g) Determine the variable type of each variable in HeatScale and describe any issues,
if any, you observe. Include any code used and include your values as a comment.
(h) Convert each variable to an appropriate type (numeric, character, factor, or ordered
factor) within the data frame. For each type you choose, explain why you picked that
type. Include your values as a comment in your code.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images

Recommended textbooks for you

MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc

Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning

Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning

MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc

Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning

Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning

Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON

The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman

Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman