1.Use the summary function to gain an overview of the data set.Then display the mean and median for at least two attributes.

Adler<-read.table(file="C:\\Users\\a\\Desktop\\Cuny Homework\\Adler.csv",TRUE,",")
summary(Adler)
##        X              instruction expectation     rating       
##  Min.   :  1.00   good      :36   high:54     Min.   :-37.000  
##  1st Qu.: 27.75   none      :36   low :54     1st Qu.:-16.250  
##  Median : 54.50   scientific:36               Median : -5.500  
##  Mean   : 54.50                               Mean   : -5.546  
##  3rd Qu.: 81.25                               3rd Qu.:  4.000  
##  Max.   :108.00                               Max.   : 42.000
ratingmean<-mean(Adler$rating)
ratingmean
## [1] -5.546296
ratingmedian<-median(Adler$rating)
ratingmedian
## [1] -5.5

2.Create a new data frame with a subset of the columns and rows. Make sure to rename it.

Adler1<- data.frame(Adler$instruction,Adler$expectation,Adler$rating)
View(Adler1)
3.Create new column names for the new data frame.
colnames(Adler1)<-c("Newinstruction", "Newexpectation","NewRating")
View(Adler1)
4.Use the summary function to create an overview of your new data frame. The print the mean and median for the same two attributes. Please compare.
print(summary(Adler1))
##     Newinstruction Newexpectation   NewRating      
##  good      :36     high:54        Min.   :-37.000  
##  none      :36     low :54        1st Qu.:-16.250  
##  scientific:36                    Median : -5.500  
##                                   Mean   : -5.546  
##                                   3rd Qu.:  4.000  
##                                   Max.   : 42.000
NewRatingmean<-mean(Adler1$NewRating)
NewRatingmean
## [1] -5.546296
NewRatingmedian<-median(Adler1$NewRating)
NewRatingmedian
## [1] -5.5
summary (Adler1)# mean and median for attributes are same as in previous summery of original table.
##     Newinstruction Newexpectation   NewRating      
##  good      :36     high:54        Min.   :-37.000  
##  none      :36     low :54        1st Qu.:-16.250  
##  scientific:36                    Median : -5.500  
##                                   Mean   : -5.546  
##                                   3rd Qu.:  4.000  
##                                   Max.   : 42.000

5.For at least 3 values in a column please rename so that every value in that column is renamed. For example, suppose I have 20 values of the letter “e”in one column. Rename those values so that all 20 would show as “excellent”

names(Adler1) <-gsub ("e", "X", names (Adler1))
print (Adler1 [1:5,])
##   NXwinstruction NXwXxpXctation NXwRating
## 1           good           high        25
## 2           good           high         0
## 3           good           high       -16
## 4           good           high         5
## 5           good           high        11

6.Display enough rows to see examples of all of steps 1- 5 above.

head(Adler1,10)
##    NXwinstruction NXwXxpXctation NXwRating
## 1            good           high        25
## 2            good           high         0
## 3            good           high       -16
## 4            good           high         5
## 5            good           high        11
## 6            good           high        -6
## 7            good           high        42
## 8            good           high        -2
## 9            good           high       -13
## 10           good           high        14

7. BONUS - place the original .csv in a github file and have R read from the link. This will be a very useful skill as you progress in your data science education and career

Adler2<-read.csv(“https://raw.githubusercontent.com/uplotnik/R-Week-2-HW-Assignment/master/Adler.csv”)

Adler2