search for: ncust

Displaying 6 results from an estimated 6 matches for "ncust".

Did you mean: cust
2017 Oct 09
1
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...nish=NA) { # if no finish date is specified, use current date if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) custIDs<-unique(x[,1]) ncust<-length(custIDs) rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), fscore=rep(0,ncust),mscore=rep(0,ncust)) rfmout$rscore<-cut(by(x$rscore,x[,1],min),breaks=rbreaks,labels=FALSE) rfmout$fscore<-cut(table(x[,1]),breaks=fbreaks,labels=FALSE) rfmout$mscore<-cut(by(x[,2],x[,1]...
2017 Oct 09
2
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
..., use current date >> if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") >> x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) >> x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) >> custIDs<-unique(x[,1]) >> ncust<-length(custIDs) >> rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), >> fscore=rep(0,ncust),mscore=rep(0,ncust)) >> rfmout$rscore<-cut(by(x$rscore,x[,1],min),breaks=rbreaks,labels=FALSE) >> rfmout$fscore<-cut(table(x[,1]),breaks=fbreaks,labels=FALSE) &...
2017 Oct 09
0
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...sh date is specified, use current date > if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") > x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) > x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) > custIDs<-unique(x[,1]) > ncust<-length(custIDs) > rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), > fscore=rep(0,ncust),mscore=rep(0,ncust)) > rfmout$rscore<-cut(by(x$rscore,x[,1],min),breaks=rbreaks,labels=FALSE) > rfmout$fscore<-cut(table(x[,1]),breaks=fbreaks,labels=FALSE) > rfmout$msco...
2017 Oct 10
0
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
...gt;> if(is.na(finish)) finish<-as.Date(date(), "%a %b %d %H:%M:%S %Y") > >> x$rscore<-as.numeric(finish-as.Date(x[,3],date.format)) > >> x$rscore<-as.numeric(cut(x$rscore,breaks=rbreaks,labels=FALSE)) > >> custIDs<-unique(x[,1]) > >> ncust<-length(custIDs) > >> rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), > >> fscore=rep(0,ncust),mscore=rep(0,ncust)) > >> rfmout$rscore<-cut(by(x$rscore,x[,1],min),breaks=rbreaks,labels=FALSE) > >> rfmout$fscore<-cut(table(x[,1]),breaks=fbr...
2017 Oct 11
0
RFM analysis
...ish-as.Date(x[,3],date.format)) cat("Range of purchase recency",range(x$rscore),"\n") cat("Range of purchase freqency",range(table(x[,1])),"\n") cat("Range of purchase amount",range(by(x[,2],x[,1],sum)),"\n") custIDs<-unique(x[,1]) ncust<-length(custIDs) # initialize a data frame to hold the output rfmout<-data.frame(custID=custIDs,rscore=rep(0,ncust), fscore=rep(0,ncust),mscore=rep(0,ncust)) # categorize the minimum number of days # since last purchase for each customer rfmout$rscore<-cut(by(x$rscore,x[,1],min),bre...
2017 Oct 06
3
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
I'm trying to perform an RFM analysis on the attached dataset, I'm able to get the results using the auto_rfm function but i want to define my own breaks for RFM. as follow r <-c(30,60,90) f <-c(2,5,8) m <-c(10,20,30) but when i tried to define my own breaks i got the identical result for RFM i.e 111 for every ID. please help me with this with working R script so that i can get