mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
update
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
#############################################################
|
||||
#CRM Demo on CDNOW
|
||||
#Fang Zhou
|
||||
#Microsoft
|
||||
#############################################################
|
||||
##check if necessary R packages are installed
|
||||
install.packages("RODBC")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#############################################################
|
||||
#CRM Demo on CDNOW
|
||||
#Fang Zhou
|
||||
#Microsoft
|
||||
#############################################################
|
||||
|
||||
#install package
|
||||
install.packages("rmarkdown")
|
||||
install.packages("fpc")
|
||||
@@ -66,7 +67,7 @@ hist(df$Monetary)
|
||||
|
||||
#set the Recency ranges as 0-120 days, 120-240 days, 240-450 days, 450-500days, and more than 500days.
|
||||
r <-c(120,240,450,500)
|
||||
#set the Frequency ranges as 0 – 2times, 2-5 times,5-8 times, 8-10 times, and more than 10 times.
|
||||
#set the Frequency ranges as 0 ? 2times, 2-5 times,5-8 times, 8-10 times, and more than 10 times.
|
||||
f <-c(2,5,8,10)
|
||||
#set the Monetary ranges as 0-10 dollars, 10-20 dollars, and so on.
|
||||
m <-c(10,20,30,100)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################
|
||||
##CRM Demo in-SQL compute context
|
||||
##Fang Zhou
|
||||
##Microsoft
|
||||
#################################################################
|
||||
|
||||
connectionString <- "Driver=SQL Server;Server=tcp:192.168.176.130,1433;Database=sqlr;Uid=sa;Pwd=Microsoft1"
|
||||
@@ -155,10 +155,7 @@ sqlSave(channel,DTreePred,rownames=FALSE,append=FALSE,varTypes=list(numeric="flo
|
||||
odbcClose(channel)
|
||||
|
||||
|
||||
#Examples for RxInSqlSever compute context
|
||||
file.show(system.file("demoScripts/SqlServerIOQ_Tests_Setup.sql", package = "RevoScaleR"))
|
||||
file.show(system.file("demoScripts/SqlServerIOQ_Tests.sql", package = "RevoScaleR"))
|
||||
file.show(system.file("demoScripts/SqlServerIOQ_Tests_Teardown.sql", package = "RevoScaleR"))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user