Question: R PROGRAMMING Initialize the House and Senate data as shown below: house
R PROGRAMMING
Initialize the House and Senate data as shown below: house <- read.csv('http://kalathur.com/house.csv', stringsAsFactors = FALSE) senate <- read.csv('http://kalathur.com/senate.csv', stringsAsFactors = FALSE) Provide the simplest R code for the following:
a) Show how many senators and house members are there by party lines?
b) Show the top 10 states in decreasing order by the number of house members in that state?
c) Use a box plot on the number of house members per state and determine which states are outliers?
d) What is the average number of years served by party line in the house and senate respectively?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
