Q. 1a: Write R code to display the following output regarding the number of restaurants

restaurents.df <- read.csv("SubAdvData.csv")
attach(restaurents.df)
tab1 <- table(adType,restaurantType)
addmargins(tab1)
##           restaurantType
## adType     chain independent   Sum
##   Curr Ads  2023        2972  4995
##   New Ads   1958        3010  4968
##   No Ads    2003        3034  5037
##   Sum       5984        9016 15000

Q.1b Write R code to display the following output regarding the percentages of restaurants

prop.table(tab1)
##           restaurantType
## adType         chain independent
##   Curr Ads 0.1348667   0.1981333
##   New Ads  0.1305333   0.2006667
##   No Ads   0.1335333   0.2022667

Q.1c Write R code to display the following output regarding average number of reservations

` ```

Q.2a Measure the correlation between the number of reservations & number of phonecalls received by the restaurants?

cor(restaurents.df$reservations,restaurents.df$phoneCalls)
## [1] 0.6516813

```