Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Find the College.csv in Data Set folder on Canvas; we will use this dataset to perform some practice. a. Use read.csv() to load the data

Find the College.csv in Data Set folder on Canvas; we will use this dataset to perform some practice. a. Use read.csv() to load the data into the R dataframe with name college (2 points) b. Find the how many number of data objects in this dataframe (2 points) In this dataframe, it has several attributes: Private : Public/private indicator Apps : Number of applications received Accept : Number of applicants accepted Enroll : Number of new students enrolled Top10perc : New students from top 10% of high school class Top25perc : New students from top 25% of high school class F.Undergrad : Number of full-time undergraduates P.Undergrad : Number of part-time undergraduates Outstate : Out-of-state tuition Room.Board : Room and board costs Books : Estimated book costs Personal : Estimated personal spending PhD : Percent of faculty with Ph.D.s Terminal : Percent of faculty with terminal degree S.F.Ratio : Student/faculty ratio perc.alumni : Percent of alumni who donate Expend : Instructional expenditure per student Grad.Rate : Graduation rate c. Use fix() and View() function to quickly check the dataframe that you just loaded. And use rownames(college) to check the names in row direction (3 points) d. Try the following code: rownames (college )=college [,1] View (college ) What do you find after these 2 lines of codes? (2 points) e. Lets continue to modify the dataframe to be a good look college =college [,-1]

View(college) What do you find after these 2 lines of codes? (2 points) f. Use the summary() function to generate a numerical summary of the variable in the data set, draw a short statement of what you find. (3 points) g. Create a new qualitative variable with name Elite, we are going to do some study for attribute Top10perc, We are going to divide universities into two groups based on whether or not the proportion of students coming from the top 10% of their high school classes exceeds 50%. Elite =rep ("No",nrow(college )) Elite [college$Top10perc >50]=" Yes" Elite =as.factor (Elite) college =data.frame(college ,Elite) (Here, as.factor() function converts quantitative variables into qualitative as.factor() variables.) Use summary() to see how many elite universities in datafram (4 points) h. Use hist() function to plot the histogram for attributes: Top10perc, Top25perc, F.Undergrad, Outstate (4 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

Students also viewed these Databases questions

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago

Question

1. Signs and symbols of the map Briefly by box ?

Answered: 1 week ago