# Question: use the r data from httpwwwbcfuscedu garethislcollegecsv this exercise...

###### Question details

use the R , data from http://www-bcf.usc.edu/ ~gareth/ISL/College.csv

This exercise relates to the College data set, which can be found in the file at http://www-bcf.usc.edu/ ~gareth/ISL/College.csv It contains a collection of variables for a number of universities and colleges in the US. The variables are described in question 8, chapter 2, of An Introduction to Statistical Learning. 1. Use the read.csv() function to read the data into R. Call the data frame college. Use the dim() function to find the dimensions of the data set. college=read.csv( ...

attach(college)

2. Look at the data using the fix() or edit() function. You should notice that the first column is just the name of each university. We don’t really want R to treat this as data. However, it may be handy have these names for later. Try the following commands, which will copy the college names into row labels which are not part of the data set, but rather as labels, and then delete the associated column.

rownames(college)= specify the first column of college

college= drop the first column

college[1:2,]

You should see that the first data column is Private. Note that another column of labels now appears before the Private column. This is not a data column but contains the labels that R is giving to each row. If you look at the data with fix() or edit(), youu will see that these labels are called “row.names”."

3. Use the summary() function to produce a numerical summary of the variables in the data set. call summary() here