Getting Started

Preetam

Reading The Data

# reading the data
cc.df <- read.csv("D:/IIML/Term 4/MLM/Session 3/DefaultData.csv")

Column Names Of The Dataframe

# column names of the dataframe
colnames(cc.df)
[1] "default" "student" "balance" "income" 

Number of Rows And Columns In The Dataframe

# dimension of the dataframe
dim(cc.df)
[1] 10000     4

Income Data Summary

# Display the Income mean and standard deviation
paste("Income mean=",mean(cc.df$income))
[1] "Income mean= 33516.9818759574"
paste("Income standard deviation=",sd(cc.df$income))
[1] "Income standard deviation= 13336.6395627319"

Balance Data Summary

# Display the Balance mean and standard deviation
paste("Balance mean=",mean(cc.df$balance))
[1] "Balance mean= 835.374885614944"
paste("Balance standard deviation=",sd(cc.df$balance))
[1] "Balance standard deviation= 483.71498521033"