Professional Documents
Culture Documents
RFM SQL Query
RFM SQL Query
csv",header=TRUE,sep=",");
myfile <- within(myfile, quartile <- as.integer(cut(m, quantile(m, probs=0:4/4),
include.lowest=TRUE)))
myfile <- within(myfile, quartiledate <- as.integer(cut(r, quantile(r,
probs=0:4/4), include.lowest=TRUE)))
myfile <- within(myfile, quartilefreq <- as.integer(.bincode(f, quantile(f,
probs=0:4/4), include.lowest=TRUE)))
write.csv(myfile,file="myfile.csv")