Use r code to produce a histogram of the average age of entry. Comment on the distribution of this variable.

4)

Use r code that will produce output that shows the 10 institutions that have the highest average age of entry?

5)

There are many universities with “American University” in the name. E.g.

“American University of Puerto Rico” and “National American

University-Ellsworth AFB Extension”. Use R code to create a data frame, called

americandf, that contains just the data from universities with

“American University” in the name.

6)

Provide r code that will produce the number of colleges from the College Score data frame that have average SAT scores that are above 1000. ( Do not produce

the data frame. Your code should only yield the number)

7)

Provide r code that will show a data frame that lists the 10 highest Average SAT scores in decreasing order. A partial data frame is given below.

UNITID OPEID MN_EARN_WNE_P6 INSTNM SAT_AVG ADM_RATE UGDS COSTT4_A

1 110404 113100 59800 Calif~ 1555 0.0807 979 63471

2 166683 217800 107300 Massa~ 1519 0.0794 4489 63250

3 144050 177400 73700 Unive~ 1508 0.0794 5978 70100

4 166027 215500 102200 Harva~ 1506 0.054 7447 64400

8) Using the gss_cat data frame, write r code that will produce the bar graph below. And explain in one or two sentences why the bar graph is difficult to

interpret.

9) Now write r code from the same data set that produce the transformed bar graph and comment on why it is an improvement

9)

Use r code to produce the tips data frame from the reshape2 package. Name three categorical variables in the data frame.

10)

Use r code to indicate how many levels exist for the factor day in the tips data frame and determine the frequency of each level.

Sample Solution

This question has been answered.

Get Answer