search for: mbreaks

Displaying 7 results from an estimated 7 matches for "mbreaks".

Did you mean: breaks
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)
Hi Hemant, Here is an example that might answer your questions. Please don't run previous code as it might not work. I define the break values as arguments to the function (rbreaks,fbreaks,mbreaks) If you want the breaks to work, make sure that they cover the range of the input values, otherwise you get NAs. # expects a three (or more) column data frame where # column 1 is customer ID, column 2 is amount of purchase # and column 3 is date of purchase qdrfm<-function(x,rbreaks=3,fbreaks=3...
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)
...emon <drjimlemon at gmail.com> wrote: >> >> Hi Hemant, >> Here is an example that might answer your questions. Please don't run >> previous code as it might not work. >> >> I define the break values as arguments to the function >> (rbreaks,fbreaks,mbreaks) If you want the breaks to work, make sure that >> they cover the range of the input values, otherwise you get NAs. >> >> # expects a three (or more) column data frame where >> # column 1 is customer ID, column 2 is amount of purchase >> # and column 3 is date of purch...
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)
...n 9 October 2017 at 15:51, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Hemant, > Here is an example that might answer your questions. Please don't run > previous code as it might not work. > > I define the break values as arguments to the function > (rbreaks,fbreaks,mbreaks) If you want the breaks to work, make sure that > they cover the range of the input values, otherwise you get NAs. > > # expects a three (or more) column data frame where > # column 1 is customer ID, column 2 is amount of purchase > # and column 3 is date of purchase > qdrfm<-f...
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)
...; wrote: > >> > >> Hi Hemant, > >> Here is an example that might answer your questions. Please don't run > >> previous code as it might not work. > >> > >> I define the break values as arguments to the function > >> (rbreaks,fbreaks,mbreaks) If you want the breaks to work, make sure that > >> they cover the range of the input values, otherwise you get NAs. > >> > >> # expects a three (or more) column data frame where > >> # column 1 is customer ID, column 2 is amount of purchase > >> # and...
2017 Oct 11
0
RFM analysis
Hi Hemant, Let's take it one step at a time. Save this code as "qdrfm.R" in your R working directory: It includes the comments I added last time and fixes a bug in the recency scoring. qdrfm<-function(x,rbreaks=3,fbreaks=3,mbreaks=3, date.format="%Y-%m-%d",weights=c(1,1,1),finish=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)) cat("Range of purchase recency&qu...
2007 Oct 23
1
Custom colourkey spacing in levelplot, contourplot
Dear R gurus, I have got stuck on how to customise the colorkey generated by levelplot and contourplot, in the lattice package. This best illustrated by an example: library(lattice) levelplot(volcano^20/1e45,at=c(0,0.001,0.01,0.1,1,10)) The reason for raising the volcano dataset to the 20th power is to create a dataset with a large vertical exaggeration - this is similar in nature to the data
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