Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a vector called degree consisting of the words Associate, Undergraduate, Master. ( b ) Create a vector called cost consisting of the cost values

Create a vector called degree consisting of the words Associate, Undergraduate,
Master.
(b) Create a vector called cost consisting of the cost values as numbers.
(c) Create a vector called time consisting of the times as numbers.
(d) Combine those three vectors to create a data frame called education.
(e) The average cost for a PhD (in 1,000s) is 111.9 with an average time of 5.8 years.
Create a vector called phd consisting of these values (degree, cost, time).
(f) Add phd as a row to education. 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 education and describe any issues,
if any, you observe. Include any code used and include your values as a comment.
(h) Convert each variables to an appropriate type (numeric, character, factor, or ordered
factor) within the data frame. For each type you chose, explain why you picked that
type. Include your values as a comment. Notice the different rankings of the Degree a
person can obtain. Hint: Here is a list of functions you might use in your conversions:
as.numeric(), as.character(), factor(), ordered(

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

Step: 3

blur-text-image

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

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions