Hi guye's if u don't mind solve this problem please

 

Data<-data.frame(Age=sample(10:75,50),Income=sample(6000:50000,50),Profit=sa
mple(2000:40000,50),stringsAsFactors=F)

 

uniq1<-unique(quantile(Data[[1]],seq(0,1,0.01)))

 

Interval_age<-findInterval(Data[[1]],uniq1)

bins_age<-cut(Data$Age,seq(9,80,by=10),labels=F)

 

uniq2<-unique(quantile(Data[[2]],seq(0,1,0.01)))

 

Interval_income<-findInterval(Data[[2]],uniq2)

bins_income<-cut(Data$Income,seq(6000,54000,by=4000),labels=F)

 

uniq3<-unique(quantile(Data[[3]],seq(0,1,0.01)))

 

Interval_profit<-findInterval(Data[[3]],uniq3)

bins_profit<-cut(Data$Profit,seq(1999,43000,by=5000),labels=F)

 

l<-cbind(Data,Interval_age)

m<-cbind(Data,Interval_income)

n<-cbind(Data,Interval_profit)

ll<-l[,c(-2,-3)]

mm<-m[,c(-1,-3)]

nn<-n[,c(-1,-2)]

AG<-cbind(ll,bins_age)

IN<-cbind(mm,bins_income)

PF<-cbind(nn,bins_profit)

 

Final<-cbind(AG,IN,PF)

 

Final result in this program coming intervals and bin's corresponding
variables "But I Want Interval Columns Arranging <= or >= or <,> " for
exp:-0<=10 10<=20 20<=30 this type


	[[alternative HTML version deleted]]

