Ad_1 <- subset(Attrition_data_1,Attrition_ind=="1")
Ad_0 <- subset(Attrition_data_1,Attrition_ind=="0")
s1<-sample(1:dim(Ad_0)[1],0.8*dim(Ad_0)[1])# 80% of the non-attrites
s2<-sample(1:dim(Ad_1)[1],0.8*dim(Ad_1)[1])# 80% of attritees
s3<- Ad_0 [-s1,]
summary(s3)
s4<- Ad_1 [-s2,]
summary(s4)
s5<- Ad_0[s1,]
s6<- Ad_1 [s2,]
traindata <- rbind(s5,s6)
testdata <- rbind(s3,s4)
Also, could you somehow remove the American Express signature added to your
mails? By now it is a real wall of text..
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.