Question: I have been working with a data set and answering questions, and am stuck on the last one. Here is the data set (csv) :

I have been working with a data set and answering questions, and am stuck on the last one. Here is the data set (csv) : https://cse.sc.edu/~rose/587/CSV/FBS2016.csv

Compare the salaries of the Dallas Cowboys (DAL) to the salaries of the Green Bay Packers. Create two smaller datasets called Cowboys and Packers that contain the data for just these teams.

a.) What is the total salary for each of these teams?

b.)What is the largest salary on each team and who makes this amount?

c.) What is the average salaries on both teams?

d.) How many millionaires are there on each team? e

e.) Draw a histogram of the salaries of the two teams. Make a PDF of each of these histograms. Give them sensible titles and label the axes.

I really don't need the answer to every question, I just need help with the first part. I already imported the data set and have been working with it for other questions. But when I created the "Packers" data set I created it as a list (I used this piece of R code: Packers = (salary.[as.logical(salary[, c(4) == 'GNB), c(2,5)])

The problem is I cannot sum up the salaries using colSums because it is a list. I am unsure if I need to convert it to a matrix or if there is another way to do it.

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 Databases Questions!