Question
Assignment 1: R Use the files named NationalSalaries.xlsx, and Salaries.xlsx and write R scripts to perform the following tasks: 1. Data cleaning. Determine what rows
Assignment 1: R
Use the files named NationalSalaries.xlsx, and Salaries.xlsx and write R scripts to perform the following tasks: 1. Data cleaning. Determine what rows have invalid entries in NationalSalaries.xlsx file and remove all such rows. (20) 2. Select only columns that appear in the Salaries.xlsx file. Save the result into a new file and use the new file to complete the remaining tasks below.(10') |
3. Randomly select 1500 rows. (10') 4. Create a data frame that holds only individual jobs (not major groups or all occupations) whose average hourly salary is lower than 15. (10') 5. Create a data frame that holds only individual jobs (not major groups or all occupations) in Indiana, then divide average yearly salary range into 10 intervals(bins), and count how many jobs are in each bin. (10') 6. Find the total employment for each state. (10') 7. Find the average yearly salary of all jobs in Indiana, and compare it with data provided in the data set (42630 vs 36410). (20) 8. Use a chart to compare average yearly salaries of "Computer and mathematical occupations" (coded 15 - xxxx) in Indiana, California and New York. Use colors and legends to make your chart informative. (10) |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started