Question: please use R code thank you!! I'm a bit urgent for this so need your help Initialize the city of Boston earnings dataset as shown

please use R code thank you!! I'm a bit urgent for this so need your help

Initialize the city of Boston earnings dataset as shown below:

boston <- read.csv( "https://people.bu.edu/kalathur/datasets/bostonCityEarnings.csv", colClasses = c("character", "character", "character", "integer", "character"))

Generate a subset of the dataset from Boston earnings dataset with only the top 5 departments based on the number of employees working in that department. The top 5 departments should be computed using R code. Then, use %in% operator to create the required subset.

Use a sample size of 50 for each of the following.

a) Show the sample drawn using simple random sampling without replacement.

Show the frequencies for the selected departments.

Show the percentages of these with respect to sample size.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!