Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions Write an R script which does the following: 1. Create a data frame from the following data. Use the column headings provided as column

Instructions

Write an R script which does the following:

1. Create a data frame from the following data. Use the column headings provided as column names. Be sure to use the appropriate option to prevent the LastName data from being interpreted as factors.

2. Run a summary command to summarize the data frame.

3. Use cbind to add a new column to your data frame named "Exempt" (excluded from overtime). Any employee making over 50000 in salary is exempt, otherwise they are non-exempt (A simple "Y" or "N" will suffice to indicate their exempt status).

4. Extract the first two rows of your data frame.

5. Use the str function to display the underlying numeric values of the Exempt column.

6. Add an additional row for the following employee using rbind:

EmployeeID: 1006 LastName: Rogers Salary: 55000 Exempt: Y

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions