October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to create transactions with temporal information:
> install.packages("arulesSequences")
> library(arulesSequences)
> tmp_data=list(c("A"),
+ c("A","B","C"),
+ c("A","C"),
+ c("D"),
+ c("C","F"),
+ c("A","D"),
+ c("C"),
+ c("B","C"),
+ c("A","E"),
+ c("E","F"),
+ c("A","B"),
+ c("D","F"),
+ c("C"),
+ c("B"),
+ c("E"),
+ c("G"),
+ c("A","F"),
+ c("C"),
+ c("B"),
+ c("C"))
> names(tmp_data) = paste("Tr",c(1:20), sep = "") > trans = as(tmp_data,"transactions") > transactionInfo(trans)$sequenceID=c(1,1,1,1,1,2,2,2,2,3,3,3,3,3,4 ...Read now
Unlock full access