Part 1: Read the data
# reading external data and storing into a dataframe called "cc.df"
cc.df <- read.csv("DefaultData.csv")
Part 2: Column names
# Display the column names
colnames(cc.df)
## [1] "default" "student" "balance" "income"
Part 3: Data Dimensions
# Display the Data Dimensions
dim(cc.df)
## [1] 10000 4
Part 4: Mean & Std dev
# Display mean of balance
mean(cc.df$balance)
## [1] 835.3749
# Display mean of income
mean(cc.df$income)
## [1] 33516.98
# Display std dev of balance
sd(cc.df$balance)
## [1] 483.715
# Display std dev of income
sd(cc.df$income)
## [1] 13336.64