book:ISLR
################################################################# ###Step 1: Data library(ISLR) df <- read.csv("http://www-bcf.usc.edu/~gareth/ISL/Credit.csv", header=T, sep=",") #sum(is.na(df$Income)) # Y의 누락값 확인 str(df); head(df) x <- model.matrix(Balance~., df)[,-1] # 절편(Intercept) 제외 y <- df$Balance dim(x); length(y) # 263 19 , 263 Read more…