Load Libraries

library(readr)

Read dataframe in cc.df

cc.df <- read_csv("../S2/DefaultData.csv")
## Parsed with column specification:
## cols(
##   default = col_character(),
##   student = col_character(),
##   balance = col_double(),
##   income = col_double()
## )

Write R code to list the column names.

colnames(cc.df)
## [1] "default" "student" "balance" "income"

Write R code to output the dimensions of the data frame.

dim(cc.df)
## [1] 10000     4

Write R code to find the mean and standard deviation of income and balance.

print("mean")
## [1] "mean"
sapply(cc.df[,c(3,4)], mean)
##    balance     income 
##   835.3749 33516.9819
print("sd")
## [1] "sd"
sapply(cc.df[,c(3,4)], sd)
##   balance    income 
##   483.715 13336.640

Write some simple comments based on your interpretation of the answers.

#There are 4 columns in the data viz. default, student, balance and income consisting of 1000 observations
#Standard deviation in balance is relatively large as compared to income